private void Awake() { m_DungeonStateManager = GameObject.FindWithTag("DungeonStateManager") ?.GetComponent <DungeonStateManager>() ?? throw new ArgumentNullException(nameof(m_DungeonStateManager)); m_Camera = gameObject.GetComponent <Camera>(); m_Camera.forceIntoRenderTexture = true; m_Camera.enabled = false; }
private void Awake() { if (WidthField == null) { throw new ArgumentNullException(nameof(WidthField)); } if (HeightField == null) { throw new ArgumentNullException(nameof(HeightField)); } if (ValidationErrorText == null) { throw new ArgumentNullException(nameof(ValidationErrorText)); } m_DungeonStateManager = GameObject.FindGameObjectWithTag("DungeonStateManager")? .GetComponent <DungeonStateManager>() ?? throw new ArgumentNullException(nameof(m_DungeonStateManager)); }
private void Awake() { m_DungeonStateManager = GameObject.FindWithTag("DungeonStateManager")?.GetComponent <DungeonStateManager>(); m_FloorTilePainter = FloorTileMap.gameObject.GetComponent <TilePainter>(); }