public SubModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "SubModule", displayName) { this.m_CheckObjectTypeIndex = -1; this.m_CheckObjectIndex = -1; base.m_ToolTip = "Sub emission of particles. This allows each particle to emit particles in another system."; this.Init(); }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num = 0; ModuleUI[] euiArray1 = new ModuleUI[0x16]; euiArray1[0] = new InitialModuleUI(e, so, s_ModuleNames[num++]); euiArray1[1] = new EmissionModuleUI(e, so, s_ModuleNames[num++]); euiArray1[2] = new ShapeModuleUI(e, so, s_ModuleNames[num++]); euiArray1[3] = new VelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[4] = new ClampVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[5] = new InheritVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[6] = new ForceModuleUI(e, so, s_ModuleNames[num++]); euiArray1[7] = new ColorModuleUI(e, so, s_ModuleNames[num++]); euiArray1[8] = new ColorByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[9] = new SizeModuleUI(e, so, s_ModuleNames[num++]); euiArray1[10] = new SizeByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[11] = new RotationModuleUI(e, so, s_ModuleNames[num++]); euiArray1[12] = new RotationByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[13] = new ExternalForcesModuleUI(e, so, s_ModuleNames[num++]); euiArray1[14] = new NoiseModuleUI(e, so, s_ModuleNames[num++]); euiArray1[15] = new CollisionModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x10] = new TriggerModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x11] = new SubModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x12] = new UVModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x13] = new LightsModuleUI(e, so, s_ModuleNames[num++]); euiArray1[20] = new TrailModuleUI(e, so, s_ModuleNames[num++]); return euiArray1; }
public string GetNextParticleSystemName() { string nextName = ""; string result; for (int i = 2; i < 50; i++) { nextName = L10n.Tr("Particle System ") + i; bool flag = false; ParticleSystemUI[] emitters = this.m_Emitters; for (int j = 0; j < emitters.Length; j++) { ParticleSystemUI particleSystemUI = emitters[j]; if (particleSystemUI.m_ParticleSystems.FirstOrDefault((ParticleSystem o) => o.name == nextName) != null) { flag = true; break; } } if (!flag) { result = nextName; return(result); } } result = L10n.Tr("Particle System"); return(result); }
public bool IsParticleSystemUIVisible(ParticleSystemUI psUI) { ParticleEffectUI.OwnerType ownerType = (!(this.m_Owner is ParticleSystemInspector)) ? ParticleEffectUI.OwnerType.ParticleSystemWindow : ParticleEffectUI.OwnerType.Inspector; bool result; if (ownerType == ParticleEffectUI.OwnerType.ParticleSystemWindow) { result = true; } else { ParticleSystem[] particleSystems = psUI.m_ParticleSystems; for (int i = 0; i < particleSystems.Length; i++) { ParticleSystem ps = particleSystems[i]; if (this.m_SelectedParticleSystems.FirstOrDefault((ParticleSystem o) => o == ps) != null) { result = true; return(result); } } result = false; } return(result); }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num = 0; ModuleUI[] expr_0A = new ModuleUI[22]; expr_0A[0] = new InitialModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[1] = new EmissionModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[2] = new ShapeModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[3] = new VelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[4] = new ClampVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[5] = new InheritVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[6] = new ForceModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[7] = new ColorModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[8] = new ColorByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[9] = new SizeModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[10] = new SizeByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[11] = new RotationModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[12] = new RotationByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[13] = new ExternalForcesModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[14] = new NoiseModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[15] = new CollisionModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[16] = new TriggerModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[17] = new SubModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[18] = new UVModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[19] = new LightsModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[20] = new TrailModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); return(expr_0A); }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num = 0; ModuleUI[] euiArray1 = new ModuleUI[0x16]; euiArray1[0] = new InitialModuleUI(e, so, s_ModuleNames[num++]); euiArray1[1] = new EmissionModuleUI(e, so, s_ModuleNames[num++]); euiArray1[2] = new ShapeModuleUI(e, so, s_ModuleNames[num++]); euiArray1[3] = new VelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[4] = new ClampVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[5] = new InheritVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[6] = new ForceModuleUI(e, so, s_ModuleNames[num++]); euiArray1[7] = new ColorModuleUI(e, so, s_ModuleNames[num++]); euiArray1[8] = new ColorByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[9] = new SizeModuleUI(e, so, s_ModuleNames[num++]); euiArray1[10] = new SizeByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[11] = new RotationModuleUI(e, so, s_ModuleNames[num++]); euiArray1[12] = new RotationByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[13] = new ExternalForcesModuleUI(e, so, s_ModuleNames[num++]); euiArray1[14] = new NoiseModuleUI(e, so, s_ModuleNames[num++]); euiArray1[15] = new CollisionModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x10] = new TriggerModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x11] = new SubModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x12] = new UVModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x13] = new LightsModuleUI(e, so, s_ModuleNames[num++]); euiArray1[20] = new TrailModuleUI(e, so, s_ModuleNames[num++]); return(euiArray1); }
internal void RefreshShowOnlySelected() { if (this.IsShowOnlySelectedMode()) { int[] instanceIDs = Selection.instanceIDs; ParticleSystemUI[] emitters = this.m_Emitters; for (int i = 0; i < emitters.Length; i++) { ParticleSystemUI particleSystemUI = emitters[i]; ParticleSystemRenderer particleSystemRenderer = particleSystemUI.GetParticleSystemRenderer(); if (particleSystemRenderer != null) { particleSystemRenderer.editorEnabled = instanceIDs.Contains(particleSystemUI.m_ParticleSystem.gameObject.GetInstanceID()); } } } else { ParticleSystemUI[] emitters2 = this.m_Emitters; for (int j = 0; j < emitters2.Length; j++) { ParticleSystemUI particleSystemUI2 = emitters2[j]; ParticleSystemRenderer particleSystemRenderer2 = particleSystemUI2.GetParticleSystemRenderer(); if (particleSystemRenderer2 != null) { particleSystemRenderer2.editorEnabled = true; } } } }
public string GetNextParticleSystemName() { string text = string.Empty; for (int i = 2; i < 50; i++) { text = "Particle System " + i; bool flag = false; ParticleSystemUI[] emitters = this.m_Emitters; for (int j = 0; j < emitters.Length; j++) { ParticleSystemUI particleSystemUI = emitters[j]; if (particleSystemUI.m_ParticleSystem.name == text) { flag = true; break; } } if (!flag) { return(text); } } return("Particle System"); }
public ModuleUI(ParticleSystemUI owner, SerializedObject o, string name, string displayName, VisibilityState initialVisibilityState) : base(o, name) { this.m_ToolTip = string.Empty; this.m_ModuleCurves = new List<SerializedProperty>(); this.m_CurvesRemovedWhenFolded = new List<SerializedProperty>(); this.Setup(owner, o, name, displayName, initialVisibilityState); }
private void InitAllEmitters(ParticleSystem[] shurikens) { int num = shurikens.Length; if (num == 0) { return; } this.m_Emitters = new ParticleSystemUI[num]; for (int i = 0; i < num; i++) { this.m_Emitters[i] = new ParticleSystemUI(); this.m_Emitters[i].Init(this, shurikens[i]); } ParticleSystemUI[] emitters = this.m_Emitters; for (int j = 0; j < emitters.Length; j++) { ParticleSystemUI particleSystemUI = emitters[j]; ModuleUI[] modules = particleSystemUI.m_Modules; for (int k = 0; k < modules.Length; k++) { ModuleUI moduleUI = modules[k]; if (moduleUI != null) { moduleUI.Validate(); } } } if (ParticleEffectUI.GetAllModulesVisible()) { this.SetAllModulesVisible(true); } }
public ModuleUI(ParticleSystemUI owner, SerializedObject o, string name, string displayName, VisibilityState initialVisibilityState) : base(o, name) { this.m_ToolTip = string.Empty; this.m_ModuleCurves = new List <SerializedProperty>(); this.m_CurvesRemovedWhenFolded = new List <SerializedProperty>(); this.Setup(owner, o, name, displayName, initialVisibilityState); }
internal void SetAllModulesVisible(bool showAll) { EditorPrefs.SetBool("ParticleSystemShowAllModules", showAll); ParticleSystemUI[] emitters = this.m_Emitters; for (int i = 0; i < emitters.Length; i++) { ParticleSystemUI particleSystemUI = emitters[i]; for (int j = 0; j < particleSystemUI.m_Modules.Length; j++) { ModuleUI moduleUI = particleSystemUI.m_Modules[j]; if (moduleUI != null) { if (showAll) { if (!moduleUI.visibleUI) { moduleUI.visibleUI = true; } } else { bool flag = true; if (moduleUI is RendererModuleUI && particleSystemUI.GetParticleSystemRenderer() != null) { flag = false; } if (flag && !moduleUI.enabled) { moduleUI.visibleUI = false; } } } } } }
public EmissionModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "EmissionModule", displayName) { this.m_BurstTime = new SerializedProperty[4]; this.m_BurstParticleMinCount = new SerializedProperty[4]; this.m_BurstParticleMaxCount = new SerializedProperty[4]; base.m_ToolTip = "Emission of the emitter. This controls the rate at which particles are emitted as well as burst emissions."; }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int index = 0; // Order should match GetUIModuleNames return(new ModuleUI[] { new InitialModuleUI(e, so, s_ModuleNames[index++]), new EmissionModuleUI(e, so, s_ModuleNames[index++]), new ShapeModuleUI(e, so, s_ModuleNames[index++]), new VelocityModuleUI(e, so, s_ModuleNames[index++]), new ClampVelocityModuleUI(e, so, s_ModuleNames[index++]), new InheritVelocityModuleUI(e, so, s_ModuleNames[index++]), new ForceModuleUI(e, so, s_ModuleNames[index++]), new ColorModuleUI(e, so, s_ModuleNames[index++]), new ColorByVelocityModuleUI(e, so, s_ModuleNames[index++]), new SizeModuleUI(e, so, s_ModuleNames[index++]), new SizeByVelocityModuleUI(e, so, s_ModuleNames[index++]), new RotationModuleUI(e, so, s_ModuleNames[index++]), new RotationByVelocityModuleUI(e, so, s_ModuleNames[index++]), new ExternalForcesModuleUI(e, so, s_ModuleNames[index++]), new NoiseModuleUI(e, so, s_ModuleNames[index++]), new CollisionModuleUI(e, so, s_ModuleNames[index++]), new TriggerModuleUI(e, so, s_ModuleNames[index++]), new SubModuleUI(e, so, s_ModuleNames[index++]), new UVModuleUI(e, so, s_ModuleNames[index++]), new LightsModuleUI(e, so, s_ModuleNames[index++]), new TrailModuleUI(e, so, s_ModuleNames[index++]), new CustomDataModuleUI(e, so, s_ModuleNames[index++]), null, // RendererModule is created separately in InitRendererUI (it can be added/removed) }); }
public EmissionModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "EmissionModule", displayName) { this.m_BurstTime = new SerializedProperty[4]; this.m_BurstParticleCount = new SerializedProperty[4]; this.m_GuiNames = new string[] { "Time", "Distance" }; base.m_ToolTip = "Emission of the emitter. This controls the rate at which particles are emitted as well as burst emissions."; }
private void Setup(ParticleSystemUI owner, SerializedObject o, string displayName, VisibilityState defaultVisibilityState) { m_ParticleSystemUI = owner; m_DisplayName = displayName; if (this is RendererModuleUI) { m_Enabled = GetProperty0("m_Enabled"); } else { m_Enabled = GetProperty("enabled"); } m_VisibilityState = VisibilityState.NotVisible; foreach (Object obj in o.targetObjects) { VisibilityState state = (VisibilityState)SessionState.GetInt(GetUniqueModuleName(obj), (int)defaultVisibilityState); m_VisibilityState = (VisibilityState)Mathf.Max((int)state, (int)m_VisibilityState); // use most visible state } CheckVisibilityState(); if (foldout) { Init(); } }
public CollisionModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "CollisionModule", displayName) { this.m_PlaneVizTypeNames = new string[] { "Grid", "Solid" }; this.m_Planes = new SerializedProperty[6]; this.m_PlaneVisualizationType = PlaneVizType.Solid; this.m_ScaleGrid = 1f; base.m_ToolTip = "Allows you to specify multiple collision planes that the particle can collide with."; }
public void OnSceneGUI() { ParticleSystemUI[] emitters = this.m_Emitters; for (int i = 0; i < emitters.Length; i++) { ParticleSystemUI particleSystemUI = emitters[i]; particleSystemUI.OnSceneGUI(); } }
public bool IsParticleSystemUIVisible(ParticleSystemUI psUI) { OwnerType type = !(this.m_Owner is ParticleSystemInspector) ? OwnerType.ParticleSystemWindow : OwnerType.Inspector; if ((type != OwnerType.ParticleSystemWindow) && ((type != OwnerType.Inspector) || (psUI.m_ParticleSystem != this.m_SelectedParticleSystem))) { return(false); } return(true); }
public void PlayOnAwakeChanged(bool newPlayOnAwake) { ParticleSystemUI[] emitters = this.m_Emitters; for (int i = 0; i < emitters.Length; i++) { ParticleSystemUI particleSystemUI = emitters[i]; InitialModuleUI initialModuleUI = particleSystemUI.m_Modules[0] as InitialModuleUI; initialModuleUI.m_PlayOnAwake.boolValue = newPlayOnAwake; particleSystemUI.ApplyProperties(); } }
private void Setup(ParticleSystemUI owner, SerializedObject o, string name, string displayName, ModuleUI.VisibilityState defaultVisibilityState) { this.m_ParticleSystemUI = owner; this.m_DisplayName = displayName; this.m_Enabled = !(this is RendererModuleUI) ? this.GetProperty("enabled") : this.GetProperty0("m_Enabled"); this.m_VisibilityState = (ModuleUI.VisibilityState)SessionState.GetInt(this.GetUniqueModuleName(), (int)defaultVisibilityState); this.CheckVisibilityState(); if (!this.foldout) { return; } this.Init(); }
public ParticleSystemUI GetParticleSystemUIForParticleSystem(ParticleSystem shuriken) { ParticleSystemUI[] emitters = this.m_Emitters; for (int i = 0; i < emitters.Length; i++) { ParticleSystemUI particleSystemUI = emitters[i]; if (particleSystemUI.m_ParticleSystem == shuriken) { return(particleSystemUI); } } return(null); }
public ShapeModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "ShapeModule", displayName, ModuleUI.VisibilityState.VisibleAndFolded) { this.m_BoxEditor = new BoxEditor(true, s_BoxHash); this.m_GuiNames = new string[] { "Sphere", "Hemisphere", "Cone", "Box", "Mesh", "Mesh Renderer", "Skinned Mesh Renderer", "Circle", "Edge" }; this.m_GuiTypes = new ShapeTypes[] { ShapeTypes.Sphere }; this.m_TypeToGuiTypeIndex = new int[] { 0, 0, 1, 1, 2, 3, 4, 2, 2, 2, 7, 7, 8, 5, 6, 3, 3 }; this.boxShapes = new ShapeTypes[] { ShapeTypes.Box }; this.coneShapes = new ShapeTypes[] { ShapeTypes.Cone }; this.shellShapes = new ShapeTypes[] { ShapeTypes.BoxShell }; base.m_ToolTip = "Shape of the emitter volume, which controls where particles are emitted and their initial direction."; }
public List <ParticleSystemUI> GetParticleSystemUIList(List <ParticleSystem> shurikens) { List <ParticleSystemUI> list = new List <ParticleSystemUI>(); foreach (ParticleSystem system in shurikens) { ParticleSystemUI particleSystemUIForParticleSystem = this.GetParticleSystemUIForParticleSystem(system); if (particleSystemUIForParticleSystem != null) { list.Add(particleSystemUIForParticleSystem); } } return(list); }
public void OnSceneViewGUI() { ParticleSystem root = ParticleSystemEditorUtils.GetRoot(this.m_SelectedParticleSystems[0]); if (root && root.gameObject.activeInHierarchy) { SceneViewOverlay.Window(ParticleSystemInspector.playBackTitle, new SceneViewOverlay.WindowFunction(this.SceneViewGUICallback), 600, SceneViewOverlay.WindowDisplayOption.OneWindowPerTitle); } ParticleSystemUI[] emitters = this.m_Emitters; for (int i = 0; i < emitters.Length; i++) { ParticleSystemUI particleSystemUI = emitters[i]; particleSystemUI.OnSceneViewGUI(); } }
public ShapeModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "ShapeModule", displayName, ModuleUI.VisibilityState.VisibleAndFolded) { this.m_BoxEditor = new BoxEditor(true, s_BoxHash); this.m_GuiNames = new string[] { "Sphere", "HemiSphere", "Cone", "Box", "Mesh", "Circle", "Edge" }; ShapeTypes[] typesArray1 = new ShapeTypes[7]; typesArray1[1] = ShapeTypes.HemiSphere; typesArray1[2] = ShapeTypes.Cone; typesArray1[3] = ShapeTypes.Box; typesArray1[4] = ShapeTypes.Mesh; typesArray1[5] = ShapeTypes.Circle; typesArray1[6] = ShapeTypes.SingleSidedEdge; this.m_GuiTypes = typesArray1; this.m_TypeToGuiTypeIndex = new int[] { 0, 0, 1, 1, 2, 3, 4, 2, 2, 2, 5, 5, 6 }; base.m_ToolTip = "Shape of the emitter volume, which controls where particles are emitted and their initial direction."; }
internal int GetNumEnabledRenderers() { int num = 0; ParticleSystemUI[] emitters = this.m_Emitters; for (int i = 0; i < emitters.Length; i++) { ParticleSystemUI particleSystemUI = emitters[i]; ModuleUI particleSystemRendererModuleUI = particleSystemUI.GetParticleSystemRendererModuleUI(); if (particleSystemRendererModuleUI != null && particleSystemRendererModuleUI.enabled) { num++; } } return(num); }
public bool IsParticleSystemUIVisible(ParticleSystemUI psUI) { switch (!(this.m_Owner is ParticleSystemInspector) ? ParticleEffectUI.OwnerType.ParticleSystemWindow : ParticleEffectUI.OwnerType.Inspector) { case ParticleEffectUI.OwnerType.ParticleSystemWindow: return(true); case ParticleEffectUI.OwnerType.Inspector: if (!((UnityEngine.Object)psUI.m_ParticleSystem == (UnityEngine.Object) this.m_SelectedParticleSystem)) { break; } goto case ParticleEffectUI.OwnerType.ParticleSystemWindow; } return(false); }
private List <ParticleSystemUI> GetSelectedParticleSystemUIs() { List <ParticleSystemUI> list = new List <ParticleSystemUI>(); int[] instanceIDs = Selection.instanceIDs; ParticleSystemUI[] emitters = this.m_Emitters; for (int i = 0; i < emitters.Length; i++) { ParticleSystemUI particleSystemUI = emitters[i]; if (instanceIDs.Contains(particleSystemUI.m_ParticleSystem.gameObject.GetInstanceID())) { list.Add(particleSystemUI); } } return(list); }
public List <ParticleSystemUI> GetParticleSystemUIList(List <ParticleSystem> shurikens) { List <ParticleSystemUI> particleSystemUiList = new List <ParticleSystemUI>(); using (List <ParticleSystem> .Enumerator enumerator = shurikens.GetEnumerator()) { while (enumerator.MoveNext()) { ParticleSystemUI forParticleSystem = this.GetParticleSystemUIForParticleSystem(enumerator.Current); if (forParticleSystem != null) { particleSystemUiList.Add(forParticleSystem); } } } return(particleSystemUiList); }
public void Init(ParticleEffectUI owner, ParticleSystem ps) { if (ParticleSystemUI.s_ModuleNames == null) { ParticleSystemUI.s_ModuleNames = ParticleSystemUI.GetUIModuleNames(); } this.m_ParticleEffectUI = owner; this.m_ParticleSystem = ps; this.m_ParticleSystemSerializedObject = new SerializedObject((Object)this.m_ParticleSystem); this.m_RendererSerializedObject = (SerializedObject)null; ParticleSystemUI.m_SupportsCullingText = (string)null; this.m_Modules = ParticleSystemUI.CreateUIModules(this, this.m_ParticleSystemSerializedObject); if ((Object)this.GetParticleSystemRenderer() != (Object)null) { this.InitRendererUI(); } this.UpdateParticleSystemInfoString(); }
public void Init(ParticleEffectUI owner, ParticleSystem[] systems) { if (ParticleSystemUI.s_ModuleNames == null) { ParticleSystemUI.s_ModuleNames = ParticleSystemUI.GetUIModuleNames(); } this.m_ParticleEffectUI = owner; this.m_ParticleSystems = systems; this.m_ParticleSystemSerializedObject = new SerializedObject(this.m_ParticleSystems); this.m_RendererSerializedObject = null; this.m_SupportsCullingText = null; this.m_Modules = ParticleSystemUI.CreateUIModules(this, this.m_ParticleSystemSerializedObject); if (!(this.m_ParticleSystems.FirstOrDefault((ParticleSystem o) => o.GetComponent <ParticleSystemRenderer>() == null) != null)) { this.InitRendererUI(); } this.UpdateParticleSystemInfoString(); }
internal void UndoRedoPerformed() { ParticleSystemUI[] emitters = this.m_Emitters; for (int i = 0; i < emitters.Length; i++) { ParticleSystemUI particleSystemUI = emitters[i]; ModuleUI[] modules = particleSystemUI.m_Modules; for (int j = 0; j < modules.Length; j++) { ModuleUI moduleUI = modules[j]; if (moduleUI != null) { moduleUI.CheckVisibilityState(); } } } this.m_Owner.Repaint(); }
public InitialModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "InitialModule", displayName, ModuleUI.VisibilityState.VisibleAndFoldedOut) { this.Init(); }
public ClampVelocityModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "ClampVelocityModule", displayName) { this.m_ToolTip = "Controls the velocity limit and damping of each particle during its lifetime."; }
public TrailModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "TrailModule", displayName) { base.m_ToolTip = "Attach trails to the particles."; }
public TriggerModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "TriggerModule", displayName) { this.m_CollisionShapes = new SerializedProperty[6]; base.m_ToolTip = "Allows you to execute script code based on whether particles are inside or outside the collision shapes."; }
public SubModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "SubModule", displayName) { this.m_ToolTip = "Sub emission of particles. This allows each particle to emit particles in another system."; this.Init(); }
public ForceModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "ForceModule", displayName) { this.m_ToolTip = "Controls the force of each particle during its lifetime."; }
public VelocityModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "VelocityModule", displayName) { base.m_ToolTip = "Controls the velocity of each particle during its lifetime."; }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num = 0; ModuleUI[] expr_09 = new ModuleUI[17]; expr_09[0] = new InitialModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[1] = new EmissionModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[2] = new ShapeModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[3] = new VelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[4] = new ClampVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[5] = new ForceModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[6] = new ColorModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[7] = new ColorByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[8] = new SizeModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[9] = new SizeByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[10] = new RotationModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[11] = new RotationByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[12] = new ExternalForcesModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[13] = new CollisionModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[14] = new SubModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[15] = new UVModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); return expr_09; }
public EmissionModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "EmissionModule", displayName) { this.m_ToolTip = "Emission of the emitter. This controls the rate at which particles are emitted as well as burst emissions."; }
public SizeModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "SizeModule", displayName) { this.m_SizeText = new GUIContent("Size", "Controls the size of each particle during its lifetime."); base.m_ToolTip = "Controls the size of each particle during its lifetime."; }
public bool IsParticleSystemUIVisible(ParticleSystemUI psUI) { switch (!(this.m_Owner is ParticleSystemInspector) ? ParticleEffectUI.OwnerType.ParticleSystemWindow : ParticleEffectUI.OwnerType.Inspector) { case ParticleEffectUI.OwnerType.ParticleSystemWindow: return true; case ParticleEffectUI.OwnerType.Inspector: if (!((UnityEngine.Object) psUI.m_ParticleSystem == (UnityEngine.Object) this.m_SelectedParticleSystem)) break; goto case ParticleEffectUI.OwnerType.ParticleSystemWindow; } return false; }
public CollisionModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "CollisionModule", displayName) { this.m_ToolTip = "Allows you to specify multiple collision planes that the particle can collide with."; }
public ExternalForcesModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "ExternalForcesModule", displayName) { base.m_ToolTip = "Controls the wind zones that each particle is affected by."; }
public ShapeModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "ShapeModule", displayName, ModuleUI.VisibilityState.VisibleAndFolded) { this.m_ToolTip = "Shape of the emitter volume, which controls where particles are emitted and their initial direction."; }
public bool IsParticleSystemUIVisible(ParticleSystemUI psUI) { ParticleEffectUI.OwnerType ownerType = (!(this.m_Owner is ParticleSystemInspector)) ? ParticleEffectUI.OwnerType.ParticleSystemWindow : ParticleEffectUI.OwnerType.Inspector; return ownerType == ParticleEffectUI.OwnerType.ParticleSystemWindow || (ownerType == ParticleEffectUI.OwnerType.Inspector && psUI.m_ParticleSystem == this.m_SelectedParticleSystem); }
public ModuleUI(ParticleSystemUI owner, SerializedObject o, string name, string displayName) : base(o, name) { this.Setup(owner, o, name, displayName, ModuleUI.VisibilityState.NotVisible); }
private void Setup(ParticleSystemUI owner, SerializedObject o, string name, string displayName, ModuleUI.VisibilityState defaultVisibilityState) { this.m_ParticleSystemUI = owner; this.m_DisplayName = displayName; if (this is RendererModuleUI) { this.m_Enabled = base.GetProperty0("m_Enabled"); } else { this.m_Enabled = base.GetProperty("enabled"); } this.m_VisibilityState = (ModuleUI.VisibilityState)InspectorState.GetInt(base.GetUniqueModuleName(), (int)defaultVisibilityState); this.CheckVisibilityState(); if (this.foldout) { this.Init(); } }
public RendererModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "ParticleSystemRenderer", displayName, ModuleUI.VisibilityState.VisibleAndFolded) { this.m_ToolTip = "Specifies how the particles are rendered."; }
public SizeByVelocityModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "SizeBySpeedModule", displayName) { this.m_ToolTip = "Controls the size of each particle based on its speed."; }
public UVModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "UVModule", displayName) { this.m_ToolTip = "Particle UV animation. This allows you to specify a texture sheet (a texture with multiple tiles/sub frames) and animate or randomize over it per particle."; }
private void Setup(ParticleSystemUI owner, SerializedObject o, string name, string displayName, ModuleUI.VisibilityState defaultVisibilityState) { this.m_ParticleSystemUI = owner; this.m_DisplayName = displayName; this.m_Enabled = !(this is RendererModuleUI) ? this.GetProperty("enabled") : this.GetProperty0("m_Enabled"); this.m_VisibilityState = (ModuleUI.VisibilityState) SessionState.GetInt(this.GetUniqueModuleName(), (int) defaultVisibilityState); this.CheckVisibilityState(); if (!this.foldout) return; this.Init(); }
public InheritVelocityModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName) : base(owner, o, "InheritVelocityModule", displayName) { this.m_ToolTip = "Controls the velocity inherited from the emitter, for each particle."; }
public bool IsParticleSystemUIVisible(ParticleSystemUI psUI) { OwnerType type = !(this.m_Owner is ParticleSystemInspector) ? OwnerType.ParticleSystemWindow : OwnerType.Inspector; return ((type == OwnerType.ParticleSystemWindow) || ((type == OwnerType.Inspector) && (psUI.m_ParticleSystem == this.m_SelectedParticleSystem))); }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num1 = 0; ModuleUI[] moduleUiArray = new ModuleUI[18]; int index1 = 0; ParticleSystemUI owner1 = e; SerializedObject o1 = so; string[] moduleNames1 = ParticleSystemUI.s_ModuleNames; int index2 = num1; int num2 = 1; int num3 = index2 + num2; string displayName1 = moduleNames1[index2]; InitialModuleUI initialModuleUi = new InitialModuleUI(owner1, o1, displayName1); moduleUiArray[index1] = (ModuleUI) initialModuleUi; int index3 = 1; ParticleSystemUI owner2 = e; SerializedObject o2 = so; string[] moduleNames2 = ParticleSystemUI.s_ModuleNames; int index4 = num3; int num4 = 1; int num5 = index4 + num4; string displayName2 = moduleNames2[index4]; EmissionModuleUI emissionModuleUi = new EmissionModuleUI(owner2, o2, displayName2); moduleUiArray[index3] = (ModuleUI) emissionModuleUi; int index5 = 2; ParticleSystemUI owner3 = e; SerializedObject o3 = so; string[] moduleNames3 = ParticleSystemUI.s_ModuleNames; int index6 = num5; int num6 = 1; int num7 = index6 + num6; string displayName3 = moduleNames3[index6]; ShapeModuleUI shapeModuleUi = new ShapeModuleUI(owner3, o3, displayName3); moduleUiArray[index5] = (ModuleUI) shapeModuleUi; int index7 = 3; ParticleSystemUI owner4 = e; SerializedObject o4 = so; string[] moduleNames4 = ParticleSystemUI.s_ModuleNames; int index8 = num7; int num8 = 1; int num9 = index8 + num8; string displayName4 = moduleNames4[index8]; VelocityModuleUI velocityModuleUi1 = new VelocityModuleUI(owner4, o4, displayName4); moduleUiArray[index7] = (ModuleUI) velocityModuleUi1; int index9 = 4; ParticleSystemUI owner5 = e; SerializedObject o5 = so; string[] moduleNames5 = ParticleSystemUI.s_ModuleNames; int index10 = num9; int num10 = 1; int num11 = index10 + num10; string displayName5 = moduleNames5[index10]; ClampVelocityModuleUI velocityModuleUi2 = new ClampVelocityModuleUI(owner5, o5, displayName5); moduleUiArray[index9] = (ModuleUI) velocityModuleUi2; int index11 = 5; ParticleSystemUI owner6 = e; SerializedObject o6 = so; string[] moduleNames6 = ParticleSystemUI.s_ModuleNames; int index12 = num11; int num12 = 1; int num13 = index12 + num12; string displayName6 = moduleNames6[index12]; InheritVelocityModuleUI velocityModuleUi3 = new InheritVelocityModuleUI(owner6, o6, displayName6); moduleUiArray[index11] = (ModuleUI) velocityModuleUi3; int index13 = 6; ParticleSystemUI owner7 = e; SerializedObject o7 = so; string[] moduleNames7 = ParticleSystemUI.s_ModuleNames; int index14 = num13; int num14 = 1; int num15 = index14 + num14; string displayName7 = moduleNames7[index14]; ForceModuleUI forceModuleUi = new ForceModuleUI(owner7, o7, displayName7); moduleUiArray[index13] = (ModuleUI) forceModuleUi; int index15 = 7; ParticleSystemUI owner8 = e; SerializedObject o8 = so; string[] moduleNames8 = ParticleSystemUI.s_ModuleNames; int index16 = num15; int num16 = 1; int num17 = index16 + num16; string displayName8 = moduleNames8[index16]; ColorModuleUI colorModuleUi = new ColorModuleUI(owner8, o8, displayName8); moduleUiArray[index15] = (ModuleUI) colorModuleUi; int index17 = 8; ParticleSystemUI owner9 = e; SerializedObject o9 = so; string[] moduleNames9 = ParticleSystemUI.s_ModuleNames; int index18 = num17; int num18 = 1; int num19 = index18 + num18; string displayName9 = moduleNames9[index18]; ColorByVelocityModuleUI velocityModuleUi4 = new ColorByVelocityModuleUI(owner9, o9, displayName9); moduleUiArray[index17] = (ModuleUI) velocityModuleUi4; int index19 = 9; ParticleSystemUI owner10 = e; SerializedObject o10 = so; string[] moduleNames10 = ParticleSystemUI.s_ModuleNames; int index20 = num19; int num20 = 1; int num21 = index20 + num20; string displayName10 = moduleNames10[index20]; SizeModuleUI sizeModuleUi = new SizeModuleUI(owner10, o10, displayName10); moduleUiArray[index19] = (ModuleUI) sizeModuleUi; int index21 = 10; ParticleSystemUI owner11 = e; SerializedObject o11 = so; string[] moduleNames11 = ParticleSystemUI.s_ModuleNames; int index22 = num21; int num22 = 1; int num23 = index22 + num22; string displayName11 = moduleNames11[index22]; SizeByVelocityModuleUI velocityModuleUi5 = new SizeByVelocityModuleUI(owner11, o11, displayName11); moduleUiArray[index21] = (ModuleUI) velocityModuleUi5; int index23 = 11; ParticleSystemUI owner12 = e; SerializedObject o12 = so; string[] moduleNames12 = ParticleSystemUI.s_ModuleNames; int index24 = num23; int num24 = 1; int num25 = index24 + num24; string displayName12 = moduleNames12[index24]; RotationModuleUI rotationModuleUi = new RotationModuleUI(owner12, o12, displayName12); moduleUiArray[index23] = (ModuleUI) rotationModuleUi; int index25 = 12; ParticleSystemUI owner13 = e; SerializedObject o13 = so; string[] moduleNames13 = ParticleSystemUI.s_ModuleNames; int index26 = num25; int num26 = 1; int num27 = index26 + num26; string displayName13 = moduleNames13[index26]; RotationByVelocityModuleUI velocityModuleUi6 = new RotationByVelocityModuleUI(owner13, o13, displayName13); moduleUiArray[index25] = (ModuleUI) velocityModuleUi6; int index27 = 13; ParticleSystemUI owner14 = e; SerializedObject o14 = so; string[] moduleNames14 = ParticleSystemUI.s_ModuleNames; int index28 = num27; int num28 = 1; int num29 = index28 + num28; string displayName14 = moduleNames14[index28]; ExternalForcesModuleUI externalForcesModuleUi = new ExternalForcesModuleUI(owner14, o14, displayName14); moduleUiArray[index27] = (ModuleUI) externalForcesModuleUi; int index29 = 14; ParticleSystemUI owner15 = e; SerializedObject o15 = so; string[] moduleNames15 = ParticleSystemUI.s_ModuleNames; int index30 = num29; int num30 = 1; int num31 = index30 + num30; string displayName15 = moduleNames15[index30]; CollisionModuleUI collisionModuleUi = new CollisionModuleUI(owner15, o15, displayName15); moduleUiArray[index29] = (ModuleUI) collisionModuleUi; int index31 = 15; ParticleSystemUI owner16 = e; SerializedObject o16 = so; string[] moduleNames16 = ParticleSystemUI.s_ModuleNames; int index32 = num31; int num32 = 1; int num33 = index32 + num32; string displayName16 = moduleNames16[index32]; SubModuleUI subModuleUi = new SubModuleUI(owner16, o16, displayName16); moduleUiArray[index31] = (ModuleUI) subModuleUi; int index33 = 16; ParticleSystemUI owner17 = e; SerializedObject o17 = so; string[] moduleNames17 = ParticleSystemUI.s_ModuleNames; int index34 = num33; int num34 = 1; int num35 = index34 + num34; string displayName17 = moduleNames17[index34]; UVModuleUI uvModuleUi = new UVModuleUI(owner17, o17, displayName17); moduleUiArray[index33] = (ModuleUI) uvModuleUi; return moduleUiArray; }