Example #1
0
        // 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();
        }
Example #2
0
        void Start()
        {
            Decal decal = DecalSystem.CreateDecalDirect(decalData);

            decal.SetTransform(location.position, location.rotation, Vector2.one);
            decal.SetData(decalData);
            decal.transform.localScale = Vector3.one;
        }
Example #3
0
        void RefreshDecal()
        {
            m_Decal.SetData(decalDatas[m_CurrentDataIndex]);

            if (m_CurrentDataIndex < decalDatas.Length - 1)
            {
                m_CurrentDataIndex++;
            }
            else
            {
                m_CurrentDataIndex = 0;
            }
        }