コード例 #1
0
 private void Start()
 {
     spriteRenderer     = GetComponent <SpriteRenderer>();
     orb                = transform.Find("orb").gameObject.GetComponent <SpriteRenderer>();
     orbDropObjectColor = orbDropObject.GetComponent <SpriteRenderer>();
     rGBViewer          = GetComponent <RGBViewer>();
     //gameManager = FindObjectOfType<GameManager>();
 }
コード例 #2
0
    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);
        }
    }