Class AssetFileOnDisk
Reads an asset the way a game project finds it after the editor is closed: from its file, never from the
AssetDatabase's in-memory object. A test that only reads the loaded object cannot tell an edit that was
saved from one that is still waiting for a save.
Inheritance
AssetFileOnDisk
Assembly: Serenity.Tests.Shared.Editor.dll
Syntax
public static class AssetFileOnDisk
Methods
LoadFreshCopy<TAsset>(string)
A standalone copy of the TAsset deserialized straight from its file,
unrelated to the object the AssetDatabase holds for the same path.
Declaration
public static TAsset LoadFreshCopy<TAsset>(string assetPath) where TAsset : Object
Parameters
| Type |
Name |
Description |
| string |
assetPath |
|
Returns
Type Parameters
ReadText(string)
The text of the serialized asset file at assetPath.
Declaration
public static string ReadText(string assetPath)
Parameters
| Type |
Name |
Description |
| string |
assetPath |
|
Returns