DrawIsPlayingWarning
How do I use Draw Is Playing Warning
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
51 | DrawIsPlayingWarning(); | 1 |
70 | private void DrawIsPlayingWarning() | 2 |
File name: PhotonTransformViewEditor.cs
Copy
47 public override void OnInspectorGUI()
48 {
49 this.m_Target = (PhotonTransformView) target;
50
51 DrawIsPlayingWarning();
52 GUI.enabled = !Application.isPlaying;
53
54 DrawSynchronizePositionHeader();
55 DrawSynchronizePositionData();
56
57 GUI.enabled = !Application.isPlaying;
58 DrawSynchronizeRotationHeader();
59 DrawSynchronizeRotationData();
60
61 GUI.enabled = !Application.isPlaying;
62 DrawSynchronizeScaleHeader();
63 DrawSynchronizeScaleData();
64
65 serializedObject.ApplyModifiedProperties();
66
67 GUI.enabled = true;
68 }
File name: PhotonTransformViewEditor.cs
Copy
70 private void DrawIsPlayingWarning()
71 {
72 if (Application.isPlaying == false)
73 {
74 return;
75 }
76
77 GUILayout.BeginVertical(GUI.skin.box);
78 {
79 GUILayout.Label("Editing is disabled in play mode so the two objects don't go out of sync");
80 }
81 GUILayout.EndVertical();
82 }
DrawIsPlayingWarning 106 lượt xem
Gõ tìm kiếm nhanh...