UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes() System.NullReferenceException: Object reference not set to an instance of an objectĪt .FolderConstruction…cctor () in :0 When I run this code, I get these two errors :įailed to decompress data for the AssetBundle ‘Memory’. Var resource = AssetDatabase.LoadAssetAtPath(Resource.GLOBAL_RESOURCES_FOLDER + "/" + Resource.FONT_FOLDER_NAME + "/FontAwesome.ttf") ĪssetDatabase.CreateAsset(font, Resource.GLOBAL_RESOURCES_FOLDER + "/" + Resource.FONT_FOLDER_NAME + "/FontAwesome.ttf") Var fontBundle = AssetBundle.LoadFromMemoryAsync(bytes) Now, I embedded that asset bundle as binary in a dll project, this is the code I tried to use and get the font out of the bundle to write it in the folder : byte bytes = typeof(FolderConstruction).Assembly.GetFromManifest(".") when I look into the manifest I see that it says Assets/FontAwesome the font was sitting in the root of Assets folder. so, in unity 2017, i created an asset bundle from the font itself. some one long ago suggested that We should use asset bundles for this. I am trying to read a font from a dll file and put it under resources folder in “editor”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |