public static ForceGetComponent ( MonoBehaviour mb ) : T | ||
mb | MonoBehaviour | Any MonoBehaviour. |
return | T |
/// <summary> /// Show the resize panel, for debugging usage. /// </summary> public void ShowResizePanel() { if (mImage == null) { mImage = JCS_Util.ForceGetComponent <Image>(this); } else { if (mShowResizePanel && mImage.enabled) { return; } } // Show it. mImage.enabled = true; // Set image. Just a white sprite! mImage.sprite = mImageSprite; // Set color. mImage.color = mResizePanelColor; mShowResizePanel = true; }
/* Functions */ private void Awake() { if (mTextContainer == null) { mTextContainer = this.GetComponentInChildren <Text>(); } mDistanceTileAction = JCS_Util.ForceGetComponent <JCS_3DDistanceTileAction>(mTextContainer); }