Пример #1
0
        void ShowSpatializers()
        {
            spatializersProperty = spatializerManagerSerialized.FindProperty("spatializers");

            if (AddFoldOut(spatializersProperty, "Spatializers".ToGUIContent()))
            {
                spatializerManager.spatializers[spatializerManager.spatializers.Length - 1] = new PureDataSpatializer("", pureData);
                spatializerManager.spatializers[spatializerManager.spatializers.Length - 1].SetUniqueName("default", "", spatializerManager.spatializers);
            }

            if (spatializersProperty.isExpanded)
            {
                EditorGUI.indentLevel += 1;

                for (int i = 0; i < spatializersProperty.arraySize; i++)
                {
                    currentSpatializer         = spatializerManager.spatializers[i];
                    currentSpatializerProperty = spatializersProperty.GetArrayElementAtIndex(i);

                    BeginBox();

                    GUIStyle style = new GUIStyle("foldout");
                    style.fontStyle = FontStyle.Bold;

                    if (DeleteFoldOut(spatializersProperty, i, currentSpatializer.Name.ToGUIContent(), style))
                    {
                        break;
                    }
                    currentSpatializer.Showing = currentSpatializerProperty.isExpanded;

                    ShowSpatializer();

                    EndBox();
                }

                Separator();
                EditorGUI.indentLevel -= 1;
            }
        }
Пример #2
0
		void ShowSpatializers() {
			spatializersProperty = spatializerManagerSerialized.FindProperty("spatializers");
			
			if (AddFoldOut(spatializersProperty, "Spatializers".ToGUIContent())) {
				spatializerManager.spatializers[spatializerManager.spatializers.Length - 1] = new PureDataSpatializer(pureData);
				spatializerManager.spatializers[spatializerManager.spatializers.Length - 1].SetUniqueName("default", "", spatializerManager.spatializers);
			}
			
			if (spatializersProperty.isExpanded) {
				EditorGUI.indentLevel += 1;
				
				for (int i = 0; i < spatializersProperty.arraySize; i++) {
					currentSpatializer = spatializerManager.spatializers[i];
					currentSpatializerProperty = spatializersProperty.GetArrayElementAtIndex(i);
					
					BeginBox();
					
					GUIStyle style = new GUIStyle("foldout");
					style.fontStyle = FontStyle.Bold;
			
					if (DeleteFoldOut(spatializersProperty, i, currentSpatializer.Name.ToGUIContent(), style)) {
						break;
					}
					currentSpatializer.Showing = currentSpatializerProperty.isExpanded;
					
					ShowSpatializer();
					
					EndBox();
				}
				
				Separator();
				EditorGUI.indentLevel -= 1;
			}
		}