Ejemplo n.º 1
0
        public static void AddRawGameObject <T>(IEntity obj, GameObject go) where T : FracturedBaseObject
        {
            MapObjectEntity mapObject = obj as MapObjectEntity;

            mapObject.AddRawGameObject(go);
            var entityReference = go.GetComponent <EntityReference>();

            if (entityReference == null)
            {
                entityReference = go.AddComponentUncheckRequireAndDisallowMulti <EntityReference>();
            }
            entityReference.Init(mapObject.entityAdapter);
        }
Ejemplo n.º 2
0
        private static void AddRawGameObject(IEntity obj, GameObject gameObject)
        {
            MapObjectEntity mapObject = obj as MapObjectEntity;

            mapObject.AddRawGameObject(gameObject);
            var entityReference = gameObject.GetComponent <EntityReference>();

            if (entityReference == null)
            {
                entityReference = gameObject.AddComponent <EntityReference>();
            }
            entityReference.Init(mapObject.entityAdapter);
        }