summaryrefslogtreecommitdiff
path: root/Runtime/Export/ScriptAssets.txt
blob: 6002497ac73bbdd4f9cc8c4520fd9cc8da8b2bb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
}