Skip to content

Changing the decal asset at runtime #12

@vikrrd

Description

@vikrrd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions