MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / TestStruct

Class TestStruct

Source/Engine/Tests/TestScripting.h:120–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118
119// Test structure.
120API_STRUCT(NoDefault) struct TestStruct : public ISerializable
121{
122 API_AUTO_SERIALIZATION();
123 DECLARE_SCRIPTING_TYPE_MINIMAL(TestStruct);
124
125 // Var
126 API_FIELD() Float3 Vector = Float3::One;
127 // Ref
128 API_FIELD() ScriptingObject* Object = nullptr;
129 // Soft Type Ref
130 API_FIELD() SoftTypeReference<ScriptingObject> SoftTypeRef;
131 // Scene Ref
132 API_FIELD() SceneReference SceneRef;
133
134 friend bool operator==(const TestStruct& lhs, const TestStruct& rhs)
135 {
136 return lhs.Vector == rhs.Vector &&
137 lhs.Object == rhs.Object &&
138 lhs.SoftTypeRef == rhs.SoftTypeRef &&
139 lhs.SceneRef == rhs.SceneRef;
140 }
141};
142
143// Test structure.
144API_STRUCT(NoDefault) struct TestStructPOD

Callers 1

TestScripting.cppFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected