Example #1
0
        // Called when "Orientate to nearest face" button is clicked
        private void OnClickMoveToNearestFace()
        {
            Vector3 position;

            DecalUtil.GetDirectionToNearestFace(m_ActualTarget, out position);
            m_ActualTarget.SetTransform(position, m_ActualTarget.transform.rotation, m_ActualTarget.transform.lossyScale);
            m_ActualTarget.SetData(m_ActualTarget.decalData);
        }
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;
        }