Exemple #1
0
        /// <summary>
        /// Get a Decal instance.
        /// </summary>
        /// <param name="positionWS">Decal position in World space.</param>
        /// <param name="rotationWS">Decal rotation in World space.</param>
        /// <param name="scaleWS">Decal scale in World space.</param>
        /// <param name="decalData">DecalData to set.</param>
        /// <param name="usePooling">If true the Decal will be taken from a DecalPooler instance.</param>
        public static Decal GetDecal(Vector3 positionWS, Quaternion rotationWS, Vector2 scaleWS, ScriptableDecal decalData, bool usePooling)
        {
            Decal decal = GetDecalInstance(decalData, usePooling);

            decal.SetActive(true);
            decal.SetTransform(positionWS, rotationWS, scaleWS);
            decal.SetData(decalData);
            return(decal);
        }