void Awake() { activation = this.GetComponent <Activation>(); if (activation == null) { activation = this.gameObject.AddComponent <Activation>(); } activation.SetModuleType(ModuleType.FILTERING); df = this.GetComponent <DataField>(); if (df == null) { df = this.gameObject.AddComponent <DataField>(); } df.dataType = DataField.DataType.FILTERED; var transform = GetComponent <Transform>(); transform.hideFlags = HideFlags.HideInInspector; }
void Awake() { activation = this.GetComponent <Activation>(); if (activation == null) { activation = this.gameObject.AddComponent <Activation>(); } activation.SetModuleType(ModuleType.MAPPING); if (this.GetComponent <MeshFilter>() == null) { this.gameObject.AddComponent <MeshFilter>(); } if (this.GetComponent <MeshRenderer>() == null) { this.gameObject.AddComponent <MeshRenderer>(); } var transform = GetComponent <Transform>(); transform.hideFlags = HideFlags.HideInInspector; }