public override void OnInspectorGUI(ParticleSystem s) { if (UVModuleUI.s_Texts == null) { UVModuleUI.s_Texts = new UVModuleUI.Texts(); } ModuleUI.GUIIntDraggableX2(UVModuleUI.s_Texts.tiles, UVModuleUI.s_Texts.tilesX, this.m_TilesX, UVModuleUI.s_Texts.tilesY, this.m_TilesY); int num = ModuleUI.GUIPopup(UVModuleUI.s_Texts.animation, this.m_AnimationType, UVModuleUI.s_Texts.types); if (num == 1) { ModuleUI.GUIToggle(UVModuleUI.s_Texts.randomRow, this.m_RandomRow); if (!this.m_RandomRow.boolValue) { ModuleUI.GUIInt(UVModuleUI.s_Texts.row, this.m_RowIndex); } } if (num == 1) { this.m_FrameOverTime.m_RemapValue = (float)this.m_TilesX.intValue; this.m_StartFrame.m_RemapValue = (float)this.m_TilesX.intValue; } if (num == 0) { this.m_FrameOverTime.m_RemapValue = (float)(this.m_TilesX.intValue * this.m_TilesY.intValue); this.m_StartFrame.m_RemapValue = (float)(this.m_TilesX.intValue * this.m_TilesY.intValue - 1); } ModuleUI.GUIMinMaxCurve(UVModuleUI.s_Texts.frameOverTime, this.m_FrameOverTime); ModuleUI.GUIMinMaxCurve(UVModuleUI.s_Texts.startFrame, this.m_StartFrame); ModuleUI.GUIFloat(UVModuleUI.s_Texts.cycles, this.m_Cycles); this.m_UVChannelMask.intValue = (int)((UVChannelFlags)ModuleUI.GUIEnumMask(UVModuleUI.s_Texts.uvChannelMask, (UVChannelFlags)this.m_UVChannelMask.intValue)); }
public override void OnInspectorGUI(ParticleSystem s) { if (s_Texts == null) { s_Texts = new Texts(); } ModuleUI.GUIFloat(s_Texts.ratio, this.m_Ratio, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(s_Texts.lifetime, this.m_Lifetime, new GUILayoutOption[0]); ModuleUI.GUIFloat(s_Texts.minVertexDistance, this.m_MinVertexDistance, new GUILayoutOption[0]); ModuleUI.GUIPopup(s_Texts.textureMode, this.m_TextureMode, s_Texts.textureModeOptions, new GUILayoutOption[0]); ModuleUI.GUIToggle(s_Texts.worldSpace, this.m_WorldSpace, new GUILayoutOption[0]); ModuleUI.GUIToggle(s_Texts.dieWithParticles, this.m_DieWithParticles, new GUILayoutOption[0]); ModuleUI.GUIToggle(s_Texts.sizeAffectsWidth, this.m_SizeAffectsWidth, new GUILayoutOption[0]); ModuleUI.GUIToggle(s_Texts.sizeAffectsLifetime, this.m_SizeAffectsLifetime, new GUILayoutOption[0]); ModuleUI.GUIToggle(s_Texts.inheritParticleColor, this.m_InheritParticleColor, new GUILayoutOption[0]); base.GUIMinMaxGradient(s_Texts.colorOverLifetime, this.m_ColorOverLifetime, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(s_Texts.widthOverTrail, this.m_WidthOverTrail, new GUILayoutOption[0]); base.GUIMinMaxGradient(s_Texts.colorOverTrail, this.m_ColorOverTrail, new GUILayoutOption[0]); if (base.m_ParticleSystemUI.m_ParticleSystem.trails.enabled) { ParticleSystemRenderer component = base.m_ParticleSystemUI.m_ParticleSystem.GetComponent <ParticleSystemRenderer>(); if ((component != null) && (component.trailMaterial == null)) { EditorGUILayout.HelpBox("Assign a Trail Material in the Renderer Module", MessageType.Warning, true); } } }
public override void OnInspectorGUI(InitialModuleUI initial) { if (TrailModuleUI.s_Texts == null) { TrailModuleUI.s_Texts = new TrailModuleUI.Texts(); } ModuleUI.GUIFloat(TrailModuleUI.s_Texts.ratio, this.m_Ratio, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(TrailModuleUI.s_Texts.lifetime, this.m_Lifetime, new GUILayoutOption[0]); ModuleUI.GUIFloat(TrailModuleUI.s_Texts.minVertexDistance, this.m_MinVertexDistance, new GUILayoutOption[0]); ModuleUI.GUIPopup(TrailModuleUI.s_Texts.textureMode, this.m_TextureMode, TrailModuleUI.s_Texts.textureModeOptions, new GUILayoutOption[0]); ModuleUI.GUIToggle(TrailModuleUI.s_Texts.worldSpace, this.m_WorldSpace, new GUILayoutOption[0]); ModuleUI.GUIToggle(TrailModuleUI.s_Texts.dieWithParticles, this.m_DieWithParticles, new GUILayoutOption[0]); ModuleUI.GUIToggle(TrailModuleUI.s_Texts.sizeAffectsWidth, this.m_SizeAffectsWidth, new GUILayoutOption[0]); ModuleUI.GUIToggle(TrailModuleUI.s_Texts.sizeAffectsLifetime, this.m_SizeAffectsLifetime, new GUILayoutOption[0]); ModuleUI.GUIToggle(TrailModuleUI.s_Texts.inheritParticleColor, this.m_InheritParticleColor, new GUILayoutOption[0]); base.GUIMinMaxGradient(TrailModuleUI.s_Texts.colorOverLifetime, this.m_ColorOverLifetime, false, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(TrailModuleUI.s_Texts.widthOverTrail, this.m_WidthOverTrail, new GUILayoutOption[0]); base.GUIMinMaxGradient(TrailModuleUI.s_Texts.colorOverTrail, this.m_ColorOverTrail, false, new GUILayoutOption[0]); ParticleSystem[] particleSystems = this.m_ParticleSystemUI.m_ParticleSystems; for (int i = 0; i < particleSystems.Length; i++) { ParticleSystem particleSystem = particleSystems[i]; if (particleSystem.trails.enabled) { ParticleSystemRenderer component = particleSystem.GetComponent <ParticleSystemRenderer>(); if (component != null && component.trailMaterial == null) { EditorGUILayout.HelpBox("Assign a Trail Material in the Renderer Module", MessageType.Warning, true); break; } } } }
public override void OnInspectorGUI(InitialModuleUI initial) { EditorGUI.BeginChangeCheck(); bool flag = ModuleUI.GUIToggle(ClampVelocityModuleUI.s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]); if (EditorGUI.EndChangeCheck()) { if (flag) { this.m_Magnitude.RemoveCurveFromEditor(); } else { this.m_X.RemoveCurveFromEditor(); this.m_Y.RemoveCurveFromEditor(); this.m_Z.RemoveCurveFromEditor(); } } if (!this.m_X.stateHasMultipleDifferentValues) { this.m_Y.SetMinMaxState(this.m_X.state, flag); this.m_Z.SetMinMaxState(this.m_X.state, flag); } if (flag) { base.GUITripleMinMaxCurve(GUIContent.none, ClampVelocityModuleUI.s_Texts.x, this.m_X, ClampVelocityModuleUI.s_Texts.y, this.m_Y, ClampVelocityModuleUI.s_Texts.z, this.m_Z, null, new GUILayoutOption[0]); ModuleUI.GUIBoolAsPopup(ClampVelocityModuleUI.s_Texts.space, this.m_InWorldSpace, ClampVelocityModuleUI.s_Texts.spaces, new GUILayoutOption[0]); } else { ModuleUI.GUIMinMaxCurve(ClampVelocityModuleUI.s_Texts.magnitude, this.m_Magnitude, new GUILayoutOption[0]); } ModuleUI.GUIFloat(ClampVelocityModuleUI.s_Texts.dampen, this.m_Dampen, new GUILayoutOption[0]); }
public override void OnInspectorGUI(ParticleSystem s) { EditorGUI.BeginChangeCheck(); bool flag = ModuleUI.GUIToggle(ClampVelocityModuleUI.s_Texts.separateAxes, this.m_SeparateAxes); if (EditorGUI.EndChangeCheck()) { if (flag) { this.m_Magnitude.RemoveCurveFromEditor(); } else { this.m_X.RemoveCurveFromEditor(); this.m_Y.RemoveCurveFromEditor(); this.m_Z.RemoveCurveFromEditor(); } } if (flag) { this.GUITripleMinMaxCurve(GUIContent.none, ClampVelocityModuleUI.s_Texts.x, this.m_X, ClampVelocityModuleUI.s_Texts.y, this.m_Y, ClampVelocityModuleUI.s_Texts.z, this.m_Z, (SerializedProperty)null); ModuleUI.GUIBoolAsPopup(ClampVelocityModuleUI.s_Texts.space, this.m_InWorldSpace, ClampVelocityModuleUI.s_Texts.spaces); } else { ModuleUI.GUIMinMaxCurve(ClampVelocityModuleUI.s_Texts.magnitude, this.m_Magnitude); } double num = (double)ModuleUI.GUIFloat(ClampVelocityModuleUI.s_Texts.dampen, this.m_Dampen); }
public override void OnInspectorGUI(ParticleSystem s) { if (LightsModuleUI.s_Texts == null) { LightsModuleUI.s_Texts = new LightsModuleUI.Texts(); } ModuleUI.GUIObject(LightsModuleUI.s_Texts.light, this.m_Light, new GUILayoutOption[0]); ModuleUI.GUIFloat(LightsModuleUI.s_Texts.ratio, this.m_Ratio, new GUILayoutOption[0]); ModuleUI.GUIToggle(LightsModuleUI.s_Texts.randomDistribution, this.m_RandomDistribution, new GUILayoutOption[0]); ModuleUI.GUIToggle(LightsModuleUI.s_Texts.color, this.m_UseParticleColor, new GUILayoutOption[0]); ModuleUI.GUIToggle(LightsModuleUI.s_Texts.range, this.m_SizeAffectsRange, new GUILayoutOption[0]); ModuleUI.GUIToggle(LightsModuleUI.s_Texts.intensity, this.m_AlphaAffectsIntensity, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(LightsModuleUI.s_Texts.rangeCurve, this.m_Range, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(LightsModuleUI.s_Texts.intensityCurve, this.m_Intensity, new GUILayoutOption[0]); ModuleUI.GUIInt(LightsModuleUI.s_Texts.maxLights, this.m_MaxLights, new GUILayoutOption[0]); if (this.m_Light.objectReferenceValue) { Light light = (Light)this.m_Light.objectReferenceValue; if (light.type != LightType.Point && light.type != LightType.Spot) { GUIContent gUIContent = EditorGUIUtility.TextContent("Only point and spot lights are supported on particles."); EditorGUILayout.HelpBox(gUIContent.text, MessageType.Warning, true); } } }
public override void OnInspectorGUI(InitialModuleUI initial) { EditorGUI.BeginChangeCheck(); bool flag = ModuleUI.GUIToggle(RotationByVelocityModuleUI.s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]); if (EditorGUI.EndChangeCheck()) { if (!flag) { this.m_X.RemoveCurveFromEditor(); this.m_Y.RemoveCurveFromEditor(); } } if (!this.m_Z.stateHasMultipleDifferentValues) { this.m_X.SetMinMaxState(this.m_Z.state, flag); this.m_Y.SetMinMaxState(this.m_Z.state, flag); } MinMaxCurveState state = this.m_Z.state; if (flag) { this.m_Z.m_DisplayName = RotationByVelocityModuleUI.s_Texts.z; base.GUITripleMinMaxCurve(GUIContent.none, RotationByVelocityModuleUI.s_Texts.x, this.m_X, RotationByVelocityModuleUI.s_Texts.y, this.m_Y, RotationByVelocityModuleUI.s_Texts.z, this.m_Z, null, new GUILayoutOption[0]); } else { this.m_Z.m_DisplayName = RotationByVelocityModuleUI.s_Texts.rotation; ModuleUI.GUIMinMaxCurve(RotationByVelocityModuleUI.s_Texts.rotation, this.m_Z, new GUILayoutOption[0]); } using (new EditorGUI.DisabledScope(state == MinMaxCurveState.k_Scalar || state == MinMaxCurveState.k_TwoScalars)) { ModuleUI.GUIMinMaxRange(RotationByVelocityModuleUI.s_Texts.velocityRange, this.m_Range, new GUILayoutOption[0]); } }
public override void OnInspectorGUI(ParticleSystem s) { EditorGUI.BeginChangeCheck(); bool flag = ModuleUI.GUIToggle(s_Texts.separateAxis, this.m_SeparateAxis); if (EditorGUI.EndChangeCheck()) { if (flag) { this.m_Magnitude.RemoveCurveFromEditor(); } else { this.m_X.RemoveCurveFromEditor(); this.m_Y.RemoveCurveFromEditor(); this.m_Z.RemoveCurveFromEditor(); } } if (flag) { base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_X, s_Texts.y, this.m_Y, s_Texts.z, this.m_Z, null); ModuleUI.GUIBoolAsPopup(s_Texts.space, this.m_InWorldSpace, s_Texts.spaces); } else { ModuleUI.GUIMinMaxCurve(s_Texts.magnitude, this.m_Magnitude); } ModuleUI.GUIFloat(s_Texts.dampen, this.m_Dampen); }
public override void OnInspectorGUI(ParticleSystem s) { if (s_Texts == null) { s_Texts = new Texts(); } EditorGUI.BeginChangeCheck(); bool flag = ModuleUI.GUIToggle(s_Texts.separateAxes, this.m_SeparateAxes); if (EditorGUI.EndChangeCheck()) { if (flag) { this.m_Z.RemoveCurveFromEditor(); } else { this.m_X.RemoveCurveFromEditor(); this.m_Y.RemoveCurveFromEditor(); this.m_Z.RemoveCurveFromEditor(); } } if (flag) { this.m_Z.m_DisplayName = s_Texts.z; base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_X, s_Texts.y, this.m_Y, s_Texts.z, this.m_Z, null); } else { this.m_Z.m_DisplayName = s_Texts.rotation; ModuleUI.GUIMinMaxCurve(s_Texts.rotation, this.m_Z); } }
public override void OnInspectorGUI(InitialModuleUI initial) { if (CustomDataModuleUI.s_Texts == null) { CustomDataModuleUI.s_Texts = new CustomDataModuleUI.Texts(); } for (int i = 0; i < 2; i++) { GUILayout.BeginVertical("Custom" + (i + 1), GUI.skin.window, new GUILayoutOption[0]); CustomDataModuleUI.Mode mode = (CustomDataModuleUI.Mode)ModuleUI.GUIPopup(CustomDataModuleUI.s_Texts.mode, this.m_Modes[i], CustomDataModuleUI.s_Texts.modes, new GUILayoutOption[0]); if (mode == CustomDataModuleUI.Mode.Vector) { int num = Mathf.Min(ModuleUI.GUIInt(CustomDataModuleUI.s_Texts.vectorComponentCount, this.m_VectorComponentCount[i], new GUILayoutOption[0]), 4); for (int j = 0; j < num; j++) { ModuleUI.GUIMinMaxCurve(CustomDataModuleUI.s_Texts.components[j], this.m_Vectors[i, j], new GUILayoutOption[0]); } } else if (mode == CustomDataModuleUI.Mode.Color) { base.GUIMinMaxGradient(CustomDataModuleUI.s_Texts.color, this.m_Colors[i], true, new GUILayoutOption[0]); } GUILayout.EndVertical(); } }
public override void OnInspectorGUI(ParticleSystem s) { if (UVModuleUI.s_Texts == null) { UVModuleUI.s_Texts = new UVModuleUI.Texts(); } ModuleUI.GUIIntDraggableX2(UVModuleUI.s_Texts.tiles, UVModuleUI.s_Texts.tilesX, this.m_TilesX, UVModuleUI.s_Texts.tilesY, this.m_TilesY); int num1 = ModuleUI.GUIPopup(UVModuleUI.s_Texts.animation, this.m_AnimationType, UVModuleUI.s_Texts.types); if (num1 == 1) { ModuleUI.GUIToggle(UVModuleUI.s_Texts.randomRow, this.m_RandomRow); if (!this.m_RandomRow.boolValue) { ModuleUI.GUIInt(UVModuleUI.s_Texts.row, this.m_RowIndex); } } if (num1 == 1) { this.m_FrameOverTime.m_RemapValue = (float)this.m_TilesX.intValue; } if (num1 == 0) { this.m_FrameOverTime.m_RemapValue = (float)(this.m_TilesX.intValue * this.m_TilesY.intValue); } ModuleUI.GUIMinMaxCurve(UVModuleUI.s_Texts.frameOverTime, this.m_FrameOverTime); double num2 = (double)ModuleUI.GUIFloat(UVModuleUI.s_Texts.cycles, this.m_Cycles); }
public override void OnInspectorGUI(ParticleSystem s) { if (RotationByVelocityModuleUI.s_Texts == null) { RotationByVelocityModuleUI.s_Texts = new RotationByVelocityModuleUI.Texts(); } EditorGUI.BeginChangeCheck(); bool flag = ModuleUI.GUIToggle(RotationByVelocityModuleUI.s_Texts.separateAxes, this.m_SeparateAxes); if (EditorGUI.EndChangeCheck()) { if (flag) { this.m_Z.RemoveCurveFromEditor(); } else { this.m_X.RemoveCurveFromEditor(); this.m_Y.RemoveCurveFromEditor(); this.m_Z.RemoveCurveFromEditor(); } } if (flag) { this.m_Z.m_DisplayName = RotationByVelocityModuleUI.s_Texts.z; this.GUITripleMinMaxCurve(GUIContent.none, RotationByVelocityModuleUI.s_Texts.x, this.m_X, RotationByVelocityModuleUI.s_Texts.y, this.m_Y, RotationByVelocityModuleUI.s_Texts.z, this.m_Z, (SerializedProperty)null); } else { this.m_Z.m_DisplayName = RotationByVelocityModuleUI.s_Texts.rotation; ModuleUI.GUIMinMaxCurve(RotationByVelocityModuleUI.s_Texts.rotation, this.m_Z); } ModuleUI.GUIMinMaxRange(RotationByVelocityModuleUI.s_Texts.velocityRange, this.m_Range); }
public override void OnInspectorGUI(InitialModuleUI initial) { EditorGUI.BeginChangeCheck(); bool flag = ModuleUI.GUIToggle(SizeModuleUI.s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]); if (EditorGUI.EndChangeCheck()) { if (!flag) { this.m_Y.RemoveCurveFromEditor(); this.m_Z.RemoveCurveFromEditor(); } } if (!this.m_X.stateHasMultipleDifferentValues) { this.m_Z.SetMinMaxState(this.m_X.state, flag); this.m_Y.SetMinMaxState(this.m_X.state, flag); } if (flag) { this.m_X.m_DisplayName = SizeModuleUI.s_Texts.x; base.GUITripleMinMaxCurve(GUIContent.none, SizeModuleUI.s_Texts.x, this.m_X, SizeModuleUI.s_Texts.y, this.m_Y, SizeModuleUI.s_Texts.z, this.m_Z, null, new GUILayoutOption[0]); } else { this.m_X.m_DisplayName = SizeModuleUI.s_Texts.size; ModuleUI.GUIMinMaxCurve(SizeModuleUI.s_Texts.size, this.m_X, new GUILayoutOption[0]); } }
public override void OnInspectorGUI(ParticleSystem s) { if (RotationModuleUI.s_Texts == null) { RotationModuleUI.s_Texts = new RotationModuleUI.Texts(); } ModuleUI.GUIMinMaxCurve(RotationModuleUI.s_Texts.rotation, this.m_Curve); }
public override void OnInspectorGUI(InitialModuleUI initial) { int num = ModuleUI.GUIPopup(UVModuleUI.s_Texts.mode, this.m_Mode, UVModuleUI.s_Texts.modes, new GUILayoutOption[0]); if (!this.m_Mode.hasMultipleDifferentValues) { if (num == 0) { ModuleUI.GUIIntDraggableX2(UVModuleUI.s_Texts.tiles, UVModuleUI.s_Texts.tilesX, this.m_TilesX, UVModuleUI.s_Texts.tilesY, this.m_TilesY, new GUILayoutOption[0]); int num2 = ModuleUI.GUIPopup(UVModuleUI.s_Texts.animation, this.m_AnimationType, UVModuleUI.s_Texts.types, new GUILayoutOption[0]); if (num2 == 1) { ModuleUI.GUIToggle(UVModuleUI.s_Texts.randomRow, this.m_RandomRow, new GUILayoutOption[0]); if (!this.m_RandomRow.boolValue) { ModuleUI.GUIInt(UVModuleUI.s_Texts.row, this.m_RowIndex, new GUILayoutOption[0]); } this.m_FrameOverTime.m_RemapValue = (float)this.m_TilesX.intValue; this.m_StartFrame.m_RemapValue = (float)this.m_TilesX.intValue; } else { this.m_FrameOverTime.m_RemapValue = (float)(this.m_TilesX.intValue * this.m_TilesY.intValue); this.m_StartFrame.m_RemapValue = (float)(this.m_TilesX.intValue * this.m_TilesY.intValue); } } else { this.DoListOfSpritesGUI(); this.ValidateSpriteList(); this.m_FrameOverTime.m_RemapValue = (float)this.m_Sprites.arraySize; this.m_StartFrame.m_RemapValue = (float)this.m_Sprites.arraySize; } ModuleUI.GUIMinMaxCurve(UVModuleUI.s_Texts.frameOverTime, this.m_FrameOverTime, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(UVModuleUI.s_Texts.startFrame, this.m_StartFrame, new GUILayoutOption[0]); } ModuleUI.GUIFloat(UVModuleUI.s_Texts.cycles, this.m_Cycles, new GUILayoutOption[0]); bool disabled = false; ParticleSystem[] particleSystems = this.m_ParticleSystemUI.m_ParticleSystems; for (int i = 0; i < particleSystems.Length; i++) { ParticleSystem particleSystem = particleSystems[i]; ParticleSystemRenderer component = particleSystem.GetComponent <ParticleSystemRenderer>(); if (component != null && component.renderMode == ParticleSystemRenderMode.Mesh) { disabled = true; break; } } using (new EditorGUI.DisabledScope(disabled)) { ModuleUI.GUIFloat(UVModuleUI.s_Texts.flipU, this.m_FlipU, new GUILayoutOption[0]); ModuleUI.GUIFloat(UVModuleUI.s_Texts.flipV, this.m_FlipV, new GUILayoutOption[0]); } ModuleUI.GUIEnumMaskUVChannelFlags(UVModuleUI.s_Texts.uvChannelMask, this.m_UVChannelMask, new GUILayoutOption[0]); }
public override void OnInspectorGUI(ParticleSystem s) { if (s_Texts == null) { s_Texts = new Texts(); } ModuleUI.GUIMinMaxCurve(s_Texts.rotation, this.m_Curve); ModuleUI.GUIMinMaxRange(s_Texts.velocityRange, this.m_Range); }
public override void OnInspectorGUI(ParticleSystem s) { ModuleUI.GUIMinMaxCurve(s_Texts.rate, this.m_Rate); ModuleUI.GUIPopup(GUIContent.none, this.m_Type, this.m_GuiNames); if (this.m_Type.intValue != 1) { this.DoBurstGUI(s); } }
public override void OnInspectorGUI(ParticleSystem s) { if (SizeByVelocityModuleUI.s_Texts == null) { SizeByVelocityModuleUI.s_Texts = new SizeByVelocityModuleUI.Texts(); } ModuleUI.GUIMinMaxCurve(SizeByVelocityModuleUI.s_Texts.size, this.m_Curve); ModuleUI.GUIMinMaxRange(SizeByVelocityModuleUI.s_Texts.velocityRange, this.m_Range); }
public override void OnInspectorGUI(InitialModuleUI initial) { if (InheritVelocityModuleUI.s_Texts == null) { InheritVelocityModuleUI.s_Texts = new InheritVelocityModuleUI.Texts(); } ModuleUI.GUIPopup(InheritVelocityModuleUI.s_Texts.mode, this.m_Mode, InheritVelocityModuleUI.s_Texts.modes, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(InheritVelocityModuleUI.s_Texts.velocity, this.m_Curve, new GUILayoutOption[0]); }
public override void OnInspectorGUI(InitialModuleUI initial) { ModuleUI.GUIMinMaxCurve(EmissionModuleUI.s_Texts.rateOverTime, this.m_Time, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(EmissionModuleUI.s_Texts.rateOverDistance, this.m_Distance, new GUILayoutOption[0]); this.DoBurstGUI(initial); if (initial.m_SimulationSpace.intValue != 1 && this.m_Distance.scalar.floatValue > 0f) { EditorGUILayout.HelpBox("Distance-based emission only works when using World Space Simulation Space", MessageType.Warning, true); } }
public override void OnInspectorGUI(ParticleSystem s) { ModuleUI.GUIMinMaxCurve(s_Texts.rateOverTime, this.m_Time, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(s_Texts.rateOverDistance, this.m_Distance, new GUILayoutOption[0]); this.DoBurstGUI(s); if ((s.main.simulationSpace != ParticleSystemSimulationSpace.World) && (this.m_Distance.scalar.floatValue > 0f)) { EditorGUILayout.HelpBox("Distance-based emission only works when using World Space Simulation Space", MessageType.Warning, true); } }
public override void OnInspectorGUI(InitialModuleUI initial) { base.GUITripleMinMaxCurve(GUIContent.none, VelocityModuleUI.s_Texts.linearX, this.m_X, VelocityModuleUI.s_Texts.y, this.m_Y, VelocityModuleUI.s_Texts.z, this.m_Z, null, new GUILayoutOption[0]); EditorGUI.indentLevel++; ModuleUI.GUIBoolAsPopup(VelocityModuleUI.s_Texts.linearSpace, this.m_InWorldSpace, VelocityModuleUI.s_Texts.spaces, new GUILayoutOption[0]); EditorGUI.indentLevel--; base.GUITripleMinMaxCurve(GUIContent.none, VelocityModuleUI.s_Texts.orbitalX, this.m_OrbitalX, VelocityModuleUI.s_Texts.y, this.m_OrbitalY, VelocityModuleUI.s_Texts.z, this.m_OrbitalZ, null, new GUILayoutOption[0]); base.GUITripleMinMaxCurve(GUIContent.none, VelocityModuleUI.s_Texts.orbitalOffsetX, this.m_OrbitalOffsetX, VelocityModuleUI.s_Texts.y, this.m_OrbitalOffsetY, VelocityModuleUI.s_Texts.z, this.m_OrbitalOffsetZ, null, new GUILayoutOption[0]); EditorGUI.indentLevel++; ModuleUI.GUIMinMaxCurve(VelocityModuleUI.s_Texts.radial, this.m_Radial, new GUILayoutOption[0]); EditorGUI.indentLevel--; ModuleUI.GUIMinMaxCurve(VelocityModuleUI.s_Texts.speedMultiplier, this.m_SpeedModifier, new GUILayoutOption[0]); }
public override void OnInspectorGUI(ParticleSystem s) { if (InheritVelocityModuleUI.s_Texts == null) { InheritVelocityModuleUI.s_Texts = new InheritVelocityModuleUI.Texts(); } ModuleUI.GUIPopup(InheritVelocityModuleUI.s_Texts.mode, this.m_Mode, InheritVelocityModuleUI.s_Texts.modes); ModuleUI.GUIMinMaxCurve(GUIContent.none, this.m_Curve); if (this.m_Curve.scalar.floatValue != 0f && !this.CanInheritVelocity(s)) { GUIContent gUIContent = EditorGUIUtility.TextContent("Inherit velocity requires interpolation enabled on the rigidbody to function correctly."); EditorGUILayout.HelpBox(gUIContent.text, MessageType.Warning, true); } }
public override void OnInspectorGUI(InitialModuleUI initial) { ParticleSystemTrailMode particleSystemTrailMode = (ParticleSystemTrailMode)ModuleUI.GUIPopup(TrailModuleUI.s_Texts.mode, this.m_Mode, TrailModuleUI.s_Texts.trailModeOptions, new GUILayoutOption[0]); if (!this.m_Mode.hasMultipleDifferentValues) { if (particleSystemTrailMode == ParticleSystemTrailMode.PerParticle) { ModuleUI.GUIFloat(TrailModuleUI.s_Texts.ratio, this.m_Ratio, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(TrailModuleUI.s_Texts.lifetime, this.m_Lifetime, new GUILayoutOption[0]); ModuleUI.GUIFloat(TrailModuleUI.s_Texts.minVertexDistance, this.m_MinVertexDistance, new GUILayoutOption[0]); ModuleUI.GUIToggle(TrailModuleUI.s_Texts.worldSpace, this.m_WorldSpace, new GUILayoutOption[0]); ModuleUI.GUIToggle(TrailModuleUI.s_Texts.dieWithParticles, this.m_DieWithParticles, new GUILayoutOption[0]); } else { ModuleUI.GUIInt(TrailModuleUI.s_Texts.ribbonCount, this.m_RibbonCount, new GUILayoutOption[0]); ModuleUI.GUIToggle(TrailModuleUI.s_Texts.splitSubEmitterRibbons, this.m_SplitSubEmitterRibbons, new GUILayoutOption[0]); } } ModuleUI.GUIPopup(TrailModuleUI.s_Texts.textureMode, this.m_TextureMode, TrailModuleUI.s_Texts.textureModeOptions, new GUILayoutOption[0]); ModuleUI.GUIToggle(TrailModuleUI.s_Texts.sizeAffectsWidth, this.m_SizeAffectsWidth, new GUILayoutOption[0]); if (!this.m_Mode.hasMultipleDifferentValues) { if (particleSystemTrailMode == ParticleSystemTrailMode.PerParticle) { ModuleUI.GUIToggle(TrailModuleUI.s_Texts.sizeAffectsLifetime, this.m_SizeAffectsLifetime, new GUILayoutOption[0]); } } ModuleUI.GUIToggle(TrailModuleUI.s_Texts.inheritParticleColor, this.m_InheritParticleColor, new GUILayoutOption[0]); base.GUIMinMaxGradient(TrailModuleUI.s_Texts.colorOverLifetime, this.m_ColorOverLifetime, false, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(TrailModuleUI.s_Texts.widthOverTrail, this.m_WidthOverTrail, new GUILayoutOption[0]); base.GUIMinMaxGradient(TrailModuleUI.s_Texts.colorOverTrail, this.m_ColorOverTrail, false, new GUILayoutOption[0]); ModuleUI.GUIToggle(TrailModuleUI.s_Texts.generateLightingData, this.m_GenerateLightingData, new GUILayoutOption[0]); ParticleSystem[] particleSystems = this.m_ParticleSystemUI.m_ParticleSystems; for (int i = 0; i < particleSystems.Length; i++) { ParticleSystem particleSystem = particleSystems[i]; if (particleSystem.trails.enabled) { ParticleSystemRenderer component = particleSystem.GetComponent <ParticleSystemRenderer>(); if (component != null && component.trailMaterial == null) { EditorGUILayout.HelpBox("Assign a Trail Material in the Renderer Module", MessageType.Warning, true); break; } } } }
public void OnInspectorGUI(ShapeModuleUI.MultiModeTexts text) { ModuleUI.GUIFloat(text.value, this.m_Value, new GUILayoutOption[0]); EditorGUI.indentLevel++; ModuleUI.GUIPopup(text.mode, this.m_Mode, ShapeModuleUI.s_Texts.emissionModes, new GUILayoutOption[0]); ModuleUI.GUIFloat(text.spread, this.m_Spread, new GUILayoutOption[0]); if (!this.m_Mode.hasMultipleDifferentValues) { ShapeModuleUI.MultiModeParameter.ValueMode intValue = (ShapeModuleUI.MultiModeParameter.ValueMode) this.m_Mode.intValue; if (intValue == ShapeModuleUI.MultiModeParameter.ValueMode.Loop || intValue == ShapeModuleUI.MultiModeParameter.ValueMode.PingPong) { ModuleUI.GUIMinMaxCurve(text.speed, this.m_Speed, new GUILayoutOption[0]); } } EditorGUI.indentLevel--; }
public override void OnInspectorGUI(ParticleSystem s) { if (SizeByVelocityModuleUI.s_Texts == null) { SizeByVelocityModuleUI.s_Texts = new SizeByVelocityModuleUI.Texts(); } EditorGUI.BeginChangeCheck(); bool flag = ModuleUI.GUIToggle(SizeByVelocityModuleUI.s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]); if (EditorGUI.EndChangeCheck()) { if (flag) { this.m_X.RemoveCurveFromEditor(); } else { this.m_X.RemoveCurveFromEditor(); this.m_Y.RemoveCurveFromEditor(); this.m_Z.RemoveCurveFromEditor(); } } SerializedMinMaxCurve arg_9C_0 = this.m_Z; MinMaxCurveState state = this.m_X.state; this.m_Y.state = state; arg_9C_0.state = state; MinMaxCurveState state2 = this.m_Z.state; if (flag) { this.m_X.m_DisplayName = SizeByVelocityModuleUI.s_Texts.x; base.GUITripleMinMaxCurve(GUIContent.none, SizeByVelocityModuleUI.s_Texts.x, this.m_X, SizeByVelocityModuleUI.s_Texts.y, this.m_Y, SizeByVelocityModuleUI.s_Texts.z, this.m_Z, null, new GUILayoutOption[0]); } else { this.m_X.m_DisplayName = SizeByVelocityModuleUI.s_Texts.size; ModuleUI.GUIMinMaxCurve(SizeByVelocityModuleUI.s_Texts.size, this.m_X, new GUILayoutOption[0]); } using (new EditorGUI.DisabledScope(state2 == MinMaxCurveState.k_Scalar || state2 == MinMaxCurveState.k_TwoScalars)) { ModuleUI.GUIMinMaxRange(SizeByVelocityModuleUI.s_Texts.velocityRange, this.m_Range, new GUILayoutOption[0]); } }
public override void OnInspectorGUI(ParticleSystem s) { if (s_Texts == null) { s_Texts = new Texts(); } EditorGUI.BeginChangeCheck(); bool flag = ModuleUI.GUIToggle(s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]); if (EditorGUI.EndChangeCheck()) { if (flag) { this.m_Z.RemoveCurveFromEditor(); } else { this.m_X.RemoveCurveFromEditor(); this.m_Y.RemoveCurveFromEditor(); this.m_Z.RemoveCurveFromEditor(); } } MinMaxCurveState state = this.m_Z.state; this.m_Y.state = state; this.m_X.state = state; MinMaxCurveState state2 = this.m_Z.state; if (flag) { this.m_Z.m_DisplayName = s_Texts.z; base.GUITripleMinMaxCurve(GUIContent.none, s_Texts.x, this.m_X, s_Texts.y, this.m_Y, s_Texts.z, this.m_Z, null, new GUILayoutOption[0]); } else { this.m_Z.m_DisplayName = s_Texts.rotation; ModuleUI.GUIMinMaxCurve(s_Texts.rotation, this.m_Z, new GUILayoutOption[0]); } using (new EditorGUI.DisabledScope((state2 == MinMaxCurveState.k_Scalar) || (state2 == MinMaxCurveState.k_TwoScalars))) { ModuleUI.GUIMinMaxRange(s_Texts.velocityRange, this.m_Range, new GUILayoutOption[0]); } }
public override void OnInspectorGUI(ParticleSystem s) { if (s_Texts == null) { s_Texts = new Texts(); } ModuleUI.GUIIntDraggableX2(s_Texts.tiles, s_Texts.tilesX, this.m_TilesX, s_Texts.tilesY, this.m_TilesY, new GUILayoutOption[0]); int num = ModuleUI.GUIPopup(s_Texts.animation, this.m_AnimationType, s_Texts.types, new GUILayoutOption[0]); if (num == 1) { ModuleUI.GUIToggle(s_Texts.randomRow, this.m_RandomRow, new GUILayoutOption[0]); if (!this.m_RandomRow.boolValue) { ModuleUI.GUIInt(s_Texts.row, this.m_RowIndex, new GUILayoutOption[0]); } } switch (num) { case 1: this.m_FrameOverTime.m_RemapValue = this.m_TilesX.intValue; this.m_StartFrame.m_RemapValue = this.m_TilesX.intValue; break; case 0: this.m_FrameOverTime.m_RemapValue = this.m_TilesX.intValue * this.m_TilesY.intValue; this.m_StartFrame.m_RemapValue = this.m_TilesX.intValue * this.m_TilesY.intValue; break; } ModuleUI.GUIMinMaxCurve(s_Texts.frameOverTime, this.m_FrameOverTime, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(s_Texts.startFrame, this.m_StartFrame, new GUILayoutOption[0]); ModuleUI.GUIFloat(s_Texts.cycles, this.m_Cycles, new GUILayoutOption[0]); ParticleSystemRenderer component = base.m_ParticleSystemUI.m_ParticleSystem.GetComponent <ParticleSystemRenderer>(); using (new EditorGUI.DisabledScope((component != null) && (component.renderMode == ParticleSystemRenderMode.Mesh))) { ModuleUI.GUIFloat(s_Texts.flipU, this.m_FlipU, new GUILayoutOption[0]); ModuleUI.GUIFloat(s_Texts.flipV, this.m_FlipV, new GUILayoutOption[0]); } this.m_UVChannelMask.intValue = (int)((UVChannelFlags)ModuleUI.GUIEnumMask(s_Texts.uvChannelMask, (UVChannelFlags)this.m_UVChannelMask.intValue, new GUILayoutOption[0])); }
public override void OnInspectorGUI(ParticleSystem s) { if (InheritVelocityModuleUI.s_Texts == null) { InheritVelocityModuleUI.s_Texts = new InheritVelocityModuleUI.Texts(); } ModuleUI.GUIPopup(InheritVelocityModuleUI.s_Texts.mode, this.m_Mode, InheritVelocityModuleUI.s_Texts.modes, new GUILayoutOption[0]); ModuleUI.GUIMinMaxCurve(InheritVelocityModuleUI.s_Texts.velocity, this.m_Curve, new GUILayoutOption[0]); if (this.m_Curve.scalar.floatValue != 0f) { Rigidbody componentInParent = s.GetComponentInParent <Rigidbody>(); Rigidbody2D componentInParent2 = s.GetComponentInParent <Rigidbody2D>(); if (componentInParent != null && !componentInParent.isKinematic) { EditorGUILayout.HelpBox("Velocity is being driven by RigidBody(" + componentInParent.name + ")", MessageType.Info, true); } else if (componentInParent2 != null && componentInParent2.bodyType == RigidbodyType2D.Dynamic) { EditorGUILayout.HelpBox("Velocity is being driven by RigidBody2D(" + componentInParent.name + ")", MessageType.Info, true); } } }
public override void OnInspectorGUI(ParticleSystem s) { if (s_Texts == null) { s_Texts = new Texts(); } ModuleUI.GUIFloat(s_Texts.duration, this.m_LengthInSec, "f2"); this.m_LengthInSec.floatValue = Mathf.Min(100000f, Mathf.Max(0f, this.m_LengthInSec.floatValue)); bool boolValue = this.m_Looping.boolValue; ModuleUI.GUIToggle(s_Texts.looping, this.m_Looping); if ((this.m_Looping.boolValue && !boolValue) && (s.time >= this.m_LengthInSec.floatValue)) { s.time = 0f; } EditorGUI.BeginDisabledGroup(!this.m_Looping.boolValue); ModuleUI.GUIToggle(s_Texts.prewarm, this.m_Prewarm); EditorGUI.EndDisabledGroup(); EditorGUI.BeginDisabledGroup(this.m_Prewarm.boolValue && this.m_Looping.boolValue); ModuleUI.GUIFloat(s_Texts.startDelay, this.m_StartDelay); EditorGUI.EndDisabledGroup(); ModuleUI.GUIMinMaxCurve(s_Texts.lifetime, this.m_LifeTime); ModuleUI.GUIMinMaxCurve(s_Texts.speed, this.m_Speed); ModuleUI.GUIMinMaxCurve(s_Texts.size, this.m_Size); ModuleUI.GUIMinMaxCurve(s_Texts.rotation, this.m_Rotation); base.GUIMinMaxGradient(s_Texts.color, this.m_Color); ModuleUI.GUIFloat(s_Texts.gravity, this.m_GravityModifier); ModuleUI.GUIFloat(s_Texts.inheritvelocity, this.m_InheritVelocity); ModuleUI.GUIBoolAsPopup(s_Texts.simulationSpace, this.m_SimulationSpace, s_Texts.simulationSpaces); bool flag2 = this.m_PlayOnAwake.boolValue; bool newPlayOnAwake = ModuleUI.GUIToggle(s_Texts.autoplay, this.m_PlayOnAwake); if (flag2 != newPlayOnAwake) { base.m_ParticleSystemUI.m_ParticleEffectUI.PlayOnAwakeChanged(newPlayOnAwake); } ModuleUI.GUIInt(s_Texts.maxParticles, this.m_MaxNumParticles); }