Anatta336 / driven-decals

A mesh-based PBR decal system for Unity's universal render pipeline.
MIT License
580 stars 75 forks source link

Changing the decal asset at runtime #12

Open vikrrd opened 3 years ago

vikrrd commented 3 years ago

Hi, I am trying to change the decal asset at runtime through a button click. Following is the code snippet.

using UnityEngine;
using SamDriver.Decal;

public class DecalChanger : MonoBehaviour
{
    public DecalMesh decalMesh;
    public DecalAsset decal;

    public void ChangeDecal()
    {
        decalMesh.DecalAsset = decal;
    }
}

This works completely fine in the editor. However, it is not, after taking the build to iOS. Any help would be appreciated.

I am using Unity 2019.4.10f1, Xcode 12.4, iPad 8th gen, iPad OS 14.4, Mac OS Big Sur 11.2.1.