Method DeclareReferencedPrefab
DeclareReferencedPrefab(GameObject)
DeclareReferencedPrefab includes the referenced Prefab in the conversion process. Once it has been declared, you can use GetPrimaryEntity to find the Entity for the Prefab. If the object is a Prefab, all Entities in it will be made part of a LinkedEntityGroup, thus Instantiate will clone the whole group. All Entities in the Prefab will also be tagged with the Prefab component thus will not be picked up by an EntityQuery by default.
Declaration
public void DeclareReferencedPrefab(GameObject prefab)
Parameters
Type | Name | Description |
---|---|---|
GameObject | prefab |