// Draw Properties fields section private void DrawProperties() { EditorGUILayout.LabelField(Styles.propertiesText, EditorStyles.boldLabel); EditorGUI.BeginChangeCheck(); var decalData = (ScriptableDecal)EditorGUILayout.ObjectField(Styles.definitionText, m_ActualTarget.decalData, typeof(ScriptableDecal), false); if (EditorGUI.EndChangeCheck()) { m_ActualTarget.SetData(decalData); } EditorGUILayout.Space(); }
void Start() { Decal decal = DecalSystem.CreateDecalDirect(decalData); decal.SetTransform(location.position, location.rotation, Vector2.one); decal.SetData(decalData); decal.transform.localScale = Vector3.one; }
void RefreshDecal() { m_Decal.SetData(decalDatas[m_CurrentDataIndex]); if (m_CurrentDataIndex < decalDatas.Length - 1) { m_CurrentDataIndex++; } else { m_CurrentDataIndex = 0; } }