コード例 #1
0
        private void Start()
        {
            if (Edition.IsDecalSystemFree)
            {
                Debug.Log("This demo only works with Decal System Pro.");
                enabled = false;
            }
            else
            {
                // Instantiate the prefab and get its decals instance.
                m_DecalsInstance = Instantiate(m_DecalsPrefab) as DS_SkinnedDecals;
                m_DecalsInstance.UseVertexColors = true;

                if (m_DecalsInstance == null)
                {
                    Debug.LogError("The decals prefab does not contain a DS_SkinnedDecals instance!");
                }
                else
                {
                    // Create the decals mesh and the cutter that are needed to compute the projections.
                    // We also cache the world to decals matrix.
                    m_DecalsMesh       = new SkinnedDecalsMesh(m_DecalsInstance);
                    m_DecalsMeshCutter = new SkinnedDecalsMeshCutter();
                }
            }
        }
コード例 #2
0
        private void Start()
        {
            // Instantiate the prefab and get its decals instance.
            m_DecalsInstance = Instantiate (m_DecalsPrefab) as DS_SkinnedDecals;

            if (m_DecalsInstance == null) {
                Debug.LogError ("The decals prefab does not contain a DS_SkinnedDecals instance!");
            } else {

                    // Create the decals mesh and the cutter that are needed to compute the projections.
                m_DecalsMesh = new SkinnedDecalsMesh (m_DecalsInstance);
                m_DecalsMeshCutter = new SkinnedDecalsMeshCutter ();
            }
        }
コード例 #3
0
        private void Start()
        {
            // Instantiate the prefab and get its decals instance.
            m_DecalsInstance = Instantiate(m_DecalsPrefab) as DS_SkinnedDecals;

            if (m_DecalsInstance == null)
            {
                Debug.LogError("The decals prefab does not contain a DS_SkinnedDecals instance!");
            }
            else
            {
                // Create the decals mesh and the cutter that are needed to compute the projections.
                m_DecalsMesh       = new SkinnedDecalsMesh(m_DecalsInstance);
                m_DecalsMeshCutter = new SkinnedDecalsMeshCutter();
            }
        }
コード例 #4
0
        private void Start()
        {
            if (Edition.IsDecalSystemFree) {
                Debug.Log ("This demo only works with Decal System Pro.");
                enabled = false;
            } else {

                    // Instantiate the prefab and get its decals instance.
                m_DecalsInstance = Instantiate (m_DecalsPrefab) as DS_SkinnedDecals;
                m_DecalsInstance.UseVertexColors = true;

                if (m_DecalsInstance == null) {
                    Debug.LogError ("The decals prefab does not contain a DS_SkinnedDecals instance!");
                } else {

                        // Create the decals mesh and the cutter that are needed to compute the projections.
                        // We also cache the world to decals matrix.
                    m_DecalsMesh = new SkinnedDecalsMesh (m_DecalsInstance);
                    m_DecalsMeshCutter = new SkinnedDecalsMeshCutter ();
                }
            }
        }