Material myMaterial; // Reference to Door's material #endregion Fields #region Methods void Start() { cursor = cursorObject.GetComponent<WorldCrosshair>(); myMaterial = GetComponent<Renderer>().material; myColor = myMaterial.color; }
bool selected; // Whether this object is selected by the cursor #endregion Fields #region Methods void Awake() { mainCam = Camera.main; cursor = cursorObject.GetComponent<WorldCrosshair>(); }