forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExternalForcesModuleUI.cs
More file actions
47 lines (38 loc) · 1.37 KB
/
Copy pathExternalForcesModuleUI.cs
File metadata and controls
47 lines (38 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using UnityEngine;
namespace UnityEditor
{
class ExternalForcesModuleUI : ModuleUI
{
SerializedProperty m_Multiplier;
class Texts
{
public GUIContent multiplier = EditorGUIUtility.TrTextContent("Multiplier", "Used to scale the force applied to this particle system.");
}
static Texts s_Texts;
public ExternalForcesModuleUI(ParticleSystemUI owner, SerializedObject o, string displayName)
: base(owner, o, "ExternalForcesModule", displayName)
{
m_ToolTip = "Controls the wind zones that each particle is affected by.";
}
protected override void Init()
{
// Already initialized?
if (m_Multiplier != null)
return;
if (s_Texts == null)
s_Texts = new Texts();
m_Multiplier = GetProperty("multiplier");
}
override public void OnInspectorGUI(InitialModuleUI initial)
{
GUIFloat(s_Texts.multiplier, m_Multiplier);
}
override public void UpdateCullingSupportedString(ref string text)
{
text += "\nExternal Forces module is enabled.";
}
} // namespace UnityEditor
}