Пример #1
0
        private void DrawUtilities()
        {
            string label = "Utilites";
            string id    = "billboardeditor-utilities";

            GEditorCommon.Foldout(label, false, id, () =>
            {
                Rect fitButtonRect = EditorGUILayout.GetControlRect();
                if (GUI.Button(fitButtonRect, "Fit Camera"))
                {
                    GBillboardCreatorArgs args = GBillboardCreator.FitCameraToTarget(ConstructArgs());
                    CopyArgs(args);
                }
            });
        }
Пример #2
0
        private void DrawTargetSettings()
        {
            string label = "Target";
            string id    = "billboardeditor-target";

            GEditorCommon.Foldout(label, false, id, () =>
            {
                EditorGUI.BeginChangeCheck();
                target = EditorGUILayout.ObjectField("Prefab", target, typeof(GameObject), true) as GameObject;
                if (EditorGUI.EndChangeCheck())
                {
                    GBillboardCreatorArgs args = GBillboardCreator.FitCameraToTarget(ConstructArgs());
                    CopyArgs(args);
                    RefreshMaterialPropsSuggestions();
                }
            });
        }