diff options
Diffstat (limited to 'Runtime/Export/ScriptAssets.txt')
-rw-r--r-- | Runtime/Export/ScriptAssets.txt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Runtime/Export/ScriptAssets.txt b/Runtime/Export/ScriptAssets.txt new file mode 100644 index 0000000..6002497 --- /dev/null +++ b/Runtime/Export/ScriptAssets.txt @@ -0,0 +1,33 @@ +C++RAW + +#include "UnityPrefix.h" +#include "Runtime/Mono/MonoBehaviour.h" +#include "Runtime/Scripting/ScriptingUtility.h" +#include "Runtime/Scripting/ScriptingExportUtility.h" +#include "Runtime/Scripting/TextAsset.h" + +CSRAW +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Collections; + + +namespace UnityEngine +{ + +// Text file assets. +NONSEALED_CLASS TextAsset : Object + // The text contents of the .txt file as a string. (RO) + CUSTOM_PROP string text { return scripting_string_new(self->GetScript().c_str()); } + + // The raw bytes of the text asset. (RO) + + CUSTOM_PROP byte[] bytes { return CreateScriptingArray( self->GetScript().c_str(), self->GetScript().size(), GetScriptingManager().GetCommonClasses().byte ); } + + CSRAW public override string ToString() { return text; } +END + + +CSRAW +} |