Home > Back-end >  'AssetPostprocessor' could not be found
'AssetPostprocessor' could not be found

Time:06-25

i was building my game to Xcode , but it;s show an error

"The type or namespace name 'AssetPostprocessor' could not be found (are you missing a using directive or an assembly reference?)"

How can I fix it?

using UnityEngine;
using UnityEditor;

public class importsetting : AssetPostprocessor
{

        void OnPreprocessTexture()
        {

            }
}

CodePudding user response:

AssetPostprocessor is in UnityEditor namespace which is not available in built application (you can use it only in Editor). You should move that script to /Editor directory so it is not included in build.

  • Related