You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 20:20:06 +00:00
resharp
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
@@ -11,12 +12,17 @@ namespace Coffee.NanoMonitor
|
||||
{
|
||||
public override void OnGUI(Rect p, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
EditorGUI.PropertyField(new Rect(p.x, p.y + 18 * 0, p.width, 16), property.FindPropertyRelative("m_Text"));
|
||||
EditorGUI.PropertyField(new Rect(p.x, p.y + 18 * 1, p.width, 16), property.FindPropertyRelative("m_Format"));
|
||||
var pos = new Rect(p.x, p.y + 18 * 0, p.width, 16);
|
||||
EditorGUI.PropertyField(pos, property.FindPropertyRelative("m_Text"));
|
||||
pos.y += 18;
|
||||
EditorGUI.PropertyField(pos, property.FindPropertyRelative("m_Format"));
|
||||
pos.y += 18;
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUI.PropertyField(new Rect(p.x, p.y + 18 * 2, p.width, 16), property.FindPropertyRelative("m_Arg0"));
|
||||
EditorGUI.PropertyField(new Rect(p.x, p.y + 18 * 3, p.width, 16), property.FindPropertyRelative("m_Arg1"));
|
||||
EditorGUI.PropertyField(new Rect(p.x, p.y + 18 * 4, p.width, 16), property.FindPropertyRelative("m_Arg2"));
|
||||
EditorGUI.PropertyField(pos, property.FindPropertyRelative("m_Arg0"));
|
||||
pos.y += 18;
|
||||
EditorGUI.PropertyField(pos, property.FindPropertyRelative("m_Arg1"));
|
||||
pos.y += 18;
|
||||
EditorGUI.PropertyField(pos, property.FindPropertyRelative("m_Arg2"));
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
@@ -29,19 +35,21 @@ namespace Coffee.NanoMonitor
|
||||
}
|
||||
#endif
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class CustomMonitorItem
|
||||
{
|
||||
[SerializeField] private MonitorUI m_Text = null;
|
||||
[SerializeField] private MonitorUI m_Text;
|
||||
[SerializeField] private string m_Format = "";
|
||||
[SerializeField] private NumericProperty m_Arg0 = null;
|
||||
[SerializeField] private NumericProperty m_Arg1 = null;
|
||||
[SerializeField] private NumericProperty m_Arg2 = null;
|
||||
[SerializeField] private NumericProperty m_Arg0;
|
||||
[SerializeField] private NumericProperty m_Arg1;
|
||||
[SerializeField] private NumericProperty m_Arg2;
|
||||
|
||||
public void UpdateText()
|
||||
{
|
||||
if (m_Text)
|
||||
{
|
||||
m_Text.SetText(m_Format, m_Arg0.Get(), m_Arg1.Get(), m_Arg2.Get());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user