private void OnValidate() { if (treeListMBDO == null || enemyListMBDO == null) { //idk if this creates a lot of garbage for the gc... MBDOInitializationHelper mBDOInitializationHelper = new MBDOInitializationHelper(this); mBDOInitializationHelper.SetupMBDO(ref treeListMBDO); mBDOInitializationHelper.SetupMBDO(ref enemyListMBDO); } if (hpEntityLogic == null) { Ally_Logic tmpAlly = FindObjectOfType <Ally_Logic>(); Entity_Logic tmp; if (tmpAlly != null) { tmp = tmpAlly.GetComponent <Entity_Logic>(); if (tmp.gameObject.scene == gameObject.scene) { hpEntityLogic = tmp; } } } }
private void Reset() { if (Application.isEditor) { if (crossSceneSceneDataSO == null) { #if UNITY_EDITOR crossSceneSceneDataSO = AssetManagement.FindAssetByType <CrossSceneSceneDataSO>(); UnityEditor.EditorUtility.SetDirty(this); #endif } if (playerTransformMBDO == null) { MBDOInitializationHelper mBDOInitializationHelper = default; //IMPORTNANT STEP!!! mBDOInitializationHelper.SetupCardinalSubSystem(this); mBDOInitializationHelper.SetupMBDO(ref playerTransformMBDO); #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(this); #endif } } }
#pragma warning restore CS0649 // varriable is never assigned to and will always have it's default value private void OnValidate() { if (Application.isEditor) { InitializeFromRangedAttack(); if (enemyListMBDO == null) { MBDOInitializationHelper mBDOInitializationHelper = default; //IMPORTNANT STEP!!! mBDOInitializationHelper.SetupCardinalSubSystem(this); mBDOInitializationHelper.SetupMBDO(ref enemyListMBDO); } if (playerTransformMBDO == null) { MBDOInitializationHelper mBDOInitializationHelper = default; //IMPORTNANT STEP!!! mBDOInitializationHelper.SetupCardinalSubSystem(this); mBDOInitializationHelper.SetupMBDO(ref playerTransformMBDO); } if (entityLogic == null) { entityLogic = GetComponent <Entity_Logic>(); #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(this); #endif } } }
private void OnValidate() { if (rigidbody2D == null) { rigidbody2D = GetComponent <Rigidbody2D>(); } if (spriteRenderer == null) { spriteRenderer = GetComponent <SpriteRenderer>(); } if (animator == null) { animator = GetComponent <Animator>(); } if (movement == null) { movement = GetComponent <Movement>(); } InitializeFromRangedAttack(); if (playerRefMBDO == null) { //idk if this creates a lot of garbage for the gc... MBDOInitializationHelper mBDOInitializationHelper = new MBDOInitializationHelper(this); mBDOInitializationHelper.SetupMBDO(ref playerRefMBDO); } }
private void OnValidate() { if (Application.isEditor) { spriteRenderers = GetComponentsInChildren <SpriteRenderer>(); SpriteRenderer tmp = GetComponent <SpriteRenderer>(); if (tmp != null) { spriteRenderers.Append(tmp); } childTransforms = GetComponentsInChildren <Transform>(); if (crossSceneSceneDataSO == null) { #if UNITY_EDITOR crossSceneSceneDataSO = AssetManagement.FindAssetByType <CrossSceneSceneDataSO>(); #endif } if (playerTransformMBDO == null) { MBDOInitializationHelper mBDOInitializationHelper = default; //IMPORTNANT STEP!!! mBDOInitializationHelper.SetupCardinalSubSystem(this); mBDOInitializationHelper.SetupMBDO(ref playerTransformMBDO); } #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(this); #endif } }
private void OnValidate() { InitializeFromRangedAttack(); if (enemyListMBDO == null || playerRefMBDO == null) { //idk if this creates a lot of garbage for the gc... MBDOInitializationHelper mBDOInitializationHelper = new MBDOInitializationHelper(this); mBDOInitializationHelper.SetupMBDO(ref playerRefMBDO); mBDOInitializationHelper.SetupMBDO(ref enemyListMBDO); } if (entityLogic == null) { entityLogic = GetComponent <Entity_Logic>(); } }
private void OnValidate() { if (playerRefMBDO == null) { //idk if this creates a lot of garbage for the gc... MBDOInitializationHelper mBDOInitializationHelper = new MBDOInitializationHelper(this); mBDOInitializationHelper.SetupMBDO(ref playerRefMBDO); } }
private void Reset() { if (Application.isEditor) { if (playerTransformMBDO == null) { MBDOInitializationHelper mBDOInitializationHelper = default; //IMPORTNANT STEP!!! mBDOInitializationHelper.SetupCardinalSubSystem(this); mBDOInitializationHelper.SetupMBDO(ref playerTransformMBDO); } } }
#pragma warning restore CS0649 private void OnValidate() { if (Application.isEditor) { if (keyListMBDO == null) { MBDOInitializationHelper mBDOInitializationHelper = default; mBDOInitializationHelper.SetupCardinalSubSystem(this); mBDOInitializationHelper.SetupMBDO(ref keyListMBDO); #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(this); #endif } } }
private void OnValidate() { if (animator == null) { animator = GetComponent <Animator>(); } if (treeListMBDO == null) { //idk if this creates a lot of garbage for the gc... MBDOInitializationHelper mBDOInitializationHelper = new MBDOInitializationHelper(this); mBDOInitializationHelper.SetupMBDO(ref treeListMBDO); } }
#pragma warning restore CS0649 private void OnValidate() { #if UNITY_EDITOR if (Application.isEditor) { if (enemyListMBDO == null) { MBDOInitializationHelper mBDOInitializationHelper = default; //IMPORTNANT STEP!!! mBDOInitializationHelper.SetupCardinalSubSystem(this); mBDOInitializationHelper.SetupMBDO(ref enemyListMBDO); } UnityEditor.EditorUtility.SetDirty(this); } #endif }
#pragma warning restore CS0649 // varriable is never assigned to and will always have it's default value private void OnValidate() { if (Application.isEditor) { if (playerTransformMBDO == null) { MBDOInitializationHelper mBDOInitializationHelper = default; //IMPORTNANT STEP!!! mBDOInitializationHelper.SetupCardinalSubSystem(this); mBDOInitializationHelper.SetupMBDO(ref playerTransformMBDO); #if UNITY_EDITOR UnityEditor.EditorUtility.SetDirty(this); #endif } } }