private void Start() { spriteRenderer = GetComponent <SpriteRenderer>(); orb = transform.Find("orb").gameObject.GetComponent <SpriteRenderer>(); orbDropObjectColor = orbDropObject.GetComponent <SpriteRenderer>(); rGBViewer = GetComponent <RGBViewer>(); //gameManager = FindObjectOfType<GameManager>(); }
public override void OnInspectorGUI() { DrawDefaultInspector(); RGBViewer myTarget = (RGBViewer)target; // myTarget.layerName = EditorGUILayout.TextField("Layer Name", myTarget.layerName); if (GUILayout.Button("Set Layer")) { myTarget.SetLayer(myTarget.layerColour); } }