Пример #1
0
        public override void OnGUI(string searchContext)
        {
            EditorGUIUtility.labelWidth = 200;
            if (m_SerializedObject == null)
            {
                if (!settings)
                {
                    settings = GLTFSettings.GetOrCreateSettings();
                }
                m_SerializedObject = new SerializedObject(settings);
            }

            SerializedProperty prop = m_SerializedObject.GetIterator();

            prop.NextVisible(true);
            if (prop.NextVisible(true))
            {
                do
                {
                    EditorGUILayout.PropertyField(prop, true);
                }while (prop.NextVisible(false));
            }

            if (m_SerializedObject.hasModifiedProperties)
            {
                m_SerializedObject.ApplyModifiedProperties();
            }
        }
Пример #2
0
 public static SettingsProvider CreateGltfSettingsProvider()
 {
     GLTFSettings.GetOrCreateSettings();
     return(new GltfSettingsProvider("Project/UnityGLTF", SettingsScope.Project));
 }