File tree Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ public sealed class ShaderPropertyPropertyDrawer : PropertyDrawer
8
8
{
9
9
public override void OnGUI ( Rect position , SerializedProperty property , GUIContent label )
10
10
{
11
- SerializedProperty name = property . FindPropertyRelative ( "_name " ) ;
12
- SerializedProperty id = property . FindPropertyRelative ( "_id " ) ;
11
+ SerializedProperty id = property . FindPropertyRelative ( "m_Id " ) ;
12
+ SerializedProperty name = property . FindPropertyRelative ( "m_Name " ) ;
13
13
14
14
EditorGUI . BeginProperty ( position , label , property ) ;
15
15
position = EditorGUI . PrefixLabel ( position , GUIUtility . GetControlID ( FocusType . Passive ) , label ) ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace Zigurous.Graphics
10
10
[ AddComponentMenu ( "Zigurous/Graphics/Cube Mesh" ) ]
11
11
public sealed class CubeMesh : MonoBehaviour
12
12
{
13
- private static Mesh _sharedMesh ;
13
+ private static Mesh m_SharedMesh ;
14
14
15
15
/// <summary>
16
16
/// A cube mesh that can be shared across many objects (Read only).
@@ -20,20 +20,20 @@ public static Mesh sharedMesh
20
20
{
21
21
get
22
22
{
23
- if ( _sharedMesh == null )
23
+ if ( m_SharedMesh == null )
24
24
{
25
25
GameObject cube = GameObject . CreatePrimitive ( PrimitiveType . Cube ) ;
26
26
27
27
if ( Application . isPlaying ) {
28
- _sharedMesh = cube . GetComponent < MeshFilter > ( ) . mesh . Copy ( ) ;
28
+ m_SharedMesh = cube . GetComponent < MeshFilter > ( ) . mesh . Copy ( ) ;
29
29
} else {
30
- _sharedMesh = cube . GetComponent < MeshFilter > ( ) . sharedMesh . Copy ( ) ;
30
+ m_SharedMesh = cube . GetComponent < MeshFilter > ( ) . sharedMesh . Copy ( ) ;
31
31
}
32
32
33
33
DestroyImmediate ( cube ) ;
34
34
}
35
35
36
- return _sharedMesh ;
36
+ return m_SharedMesh ;
37
37
}
38
38
}
39
39
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public struct ShaderProperty
11
11
{
12
12
[ SerializeField ]
13
13
[ HideInInspector ]
14
- private int _id ;
14
+ private int m_Id ;
15
15
16
16
/// <summary>
17
17
/// The id of the shader property (Read only).
@@ -20,27 +20,27 @@ public int id
20
20
{
21
21
get
22
22
{
23
- if ( _id == 0 ) {
24
- _id = Shader . PropertyToID ( _name ) ;
23
+ if ( m_Id == 0 ) {
24
+ m_Id = Shader . PropertyToID ( m_Name ) ;
25
25
}
26
- return _id ;
26
+ return m_Id ;
27
27
}
28
28
}
29
29
30
30
[ SerializeField ]
31
31
[ Tooltip ( "The name of the shader property." ) ]
32
- private string _name ;
32
+ private string m_Name ;
33
33
34
34
/// <summary>
35
35
/// The name of the shader property.
36
36
/// </summary>
37
37
public string name
38
38
{
39
- get => _name ;
39
+ get => m_Name ;
40
40
set
41
41
{
42
- _name = value ;
43
- _id = Shader . PropertyToID ( value ) ;
42
+ m_Name = value ;
43
+ m_Id = Shader . PropertyToID ( value ) ;
44
44
}
45
45
}
46
46
@@ -50,8 +50,8 @@ public string name
50
50
/// <param name="name">The name of the shader property.</param>
51
51
public ShaderProperty ( string name )
52
52
{
53
- _name = name ;
54
- _id = Shader . PropertyToID ( name ) ;
53
+ m_Name = name ;
54
+ m_Id = Shader . PropertyToID ( name ) ;
55
55
}
56
56
57
57
/// <summary>
You can’t perform that action at this time.
0 commit comments