Exemple #1
0
    void OnEnable()
    {
        bool isInProject = EditorUtility.IsPersistent(this.target);

        if (!isInProject)
        {
            blockAlign = this.target as PEBlockAlign;
            blockAlign.ShowRefPoints();
        }
        blockAlign = (PEBlockAlign)target;
    }
Exemple #2
0
    public override void OnInspectorGUI()
    {
        PEBlockAlign blockAlign = target as PEBlockAlign;

        if (GUILayout.Button("Reset"))
        {
            blockAlign.transform.position = Vector3.zero;
            blockAlign.transform.rotation = Quaternion.identity;
            blockAlign.ClearRefPoints();
            blockAlign.ShowRefPoints();
        }

        if (GUILayout.Button("Hide"))
        {
            blockAlign.HideRefPoints();
        }

        if (GUILayout.Button("Show"))
        {
            blockAlign.ShowRefPoints();
        }
    }