Hello Coders
I do want to save the preview of a prefab in a Texture2D in a scriptableObject. My current code does not work. It gets the preview, but it is not able to save it in the sriptableObject.
public class AnyObject : ScriptableObject
{
public Texture2D previewTexture;
public GameObject prefab;
public void SetPreviewTexture()
{
previewTexture = AssetPreview.GetAssetPreview(prefab);
}
}
Thanks for help