Skip to content

Instantly share code, notes, and snippets.

@SiarheiPilat
Last active May 20, 2022 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SiarheiPilat/dcd7626d12f7b6b9ed420a2f0c7341b1 to your computer and use it in GitHub Desktop.
Save SiarheiPilat/dcd7626d12f7b6b9ed420a2f0c7341b1 to your computer and use it in GitHub Desktop.
using UnityEditor;
using UnityEngine;
public class ReadWriteModelPostprocessor : AssetPostprocessor
{
void OnPreprocessModel()
{
Debug.Log("Setting Read/Write permission automatically... Delete this script if this is not intended.");
ModelImporter modelImporter = assetImporter as ModelImporter;
modelImporter.isReadable = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment