public ObjectPool() { #if !SERVER this.ViewGO = new GameObject(); this.ViewGO.name = this.GetType().Name; this.ViewGO.layer = LayerNames.GetLayerInt(LayerNames.HIDDEN); this.ViewGO.transform.SetParent(Global.transform, false); this.ViewGO.AddComponent <ComponentView>().Component = this; #endif }
public ComponentQueue(string typeName) { this.Id = IdGenerater.GenerateId(); this.TypeName = typeName; #if !SERVER this.ViewGO = new GameObject(); this.ViewGO.name = this.GetType().Name; this.ViewGO.layer = LayerNames.GetLayerInt(LayerNames.HIDDEN); this.ViewGO.transform.SetParent(Global.transform, false); this.ViewGO.AddComponent <ComponentView>().Component = this; #endif }
protected Entity() { this.InstanceId = IdGenerater.GenerateId(); #if !SERVER if (!this.GetType().IsDefined(typeof(HideInHierarchy), true)) { this.ViewGO = new GameObject(); this.ViewGO.name = this.GetType().Name; this.ViewGO.layer = LayerNames.GetLayerInt(LayerNames.HIDDEN); this.ViewGO.transform.SetParent(Global.transform, false); this.ViewGO.AddComponent <ComponentView>().Component = this; } #endif }