#pragma once #include "Engine/Scripting/Script.h" #include #include #include "Engine/Graphics/PostProcessEffect.h" #include "Engine/Graphics/RenderTask.h" #include "Engine/Graphics/Graphics.h" #include "Engine/Scripting/SoftTypeReference.h" #include "Engine/Content/SceneReference.h" API_STRUCT(NoDefault) struct TestStruct : public ISerializable { API_AUTO_SERIALIZATION(); DECLARE_SCRIPTING_TYPE_MINIMAL(TestStruct); // Var API_FIELD() Float3 Vector = Float3::One; // Ref API_FIELD() ScriptingObject* Object = nullptr; // Soft Type Ref API_FIELD() SoftTypeReference SoftTypeRef; // Scene Ref API_FIELD() SceneReference SceneRef; friend bool operator==(const TestStruct& lhs, const TestStruct& rhs) { return lhs.Vector == rhs.Vector && lhs.Object == rhs.Object && lhs.SoftTypeRef == rhs.SoftTypeRef && lhs.SceneRef == rhs.SceneRef; } }; API_CLASS() class GAME_API MyScript2 : public Script { API_AUTO_SERIALIZATION(); DECLARE_SCRIPTING_TYPE(MyScript2); API_FUNCTION() virtual void GetStats(API_PARAM(Ref) int64& allocations, API_PARAM(Ref) int64& deallocations) {}; API_FUNCTION() virtual void SimpleCall() {}; API_FUNCTION() virtual void SimpleParams(int32 a, float b, char c, double d, int64 e) {}; API_FUNCTION() virtual void StringParamAnsi(StringAnsi str) {}; API_FUNCTION() virtual void StringParam(String str) {}; API_FUNCTION() virtual void StringParamRef(String& str) {}; API_FUNCTION() virtual void StringParamRefConst(const String& str) {}; API_FUNCTION() virtual void StringParamAsRef(API_PARAM(Ref) String& str) {}; API_FUNCTION() virtual void ActorParam(Actor* actor) {}; API_FUNCTION() virtual void ComplexParam(BehaviorUpdateContext context) {}; API_FUNCTION() virtual void Complex2Param(RenderContext& context) {}; API_FUNCTION() virtual void Complex2ParamConst(const RenderContext& context) {}; API_FUNCTION() virtual void Complex2ParamAsRef(API_PARAM(Ref) RenderContext& context) {}; API_FUNCTION() virtual void SimpleArrayParam(Array arr) {}; API_FUNCTION() virtual void SimpleArrayParamRef(Array& arr) {}; API_FUNCTION() virtual void SimpleArrayParamRefConst(const Array& arr) {}; API_FUNCTION() virtual void SimpleArrayParamAsRef(API_PARAM(Ref) Array& arr) {}; API_FUNCTION() virtual void ActorArrayParam(Array arr) {}; API_FUNCTION() virtual void ActorArrayParamRef(Array& arr) {}; API_FUNCTION() virtual void ActorArrayParamRefConst(const Array& arr) {}; //API_FUNCTION() virtual void ActorArrayParamAsRef(API_PARAM(Ref) Array& arr) {}; API_FUNCTION() virtual void ComplexArrayParam(Array arr) {}; API_FUNCTION() virtual void ComplexArrayParamRef(Array& arr) {}; API_FUNCTION() virtual void ComplexArrayParamRefConst(const Array& arr) {}; API_FUNCTION() virtual void ComplexArrayParamAsRef(API_PARAM(Ref) Array& arr) {}; //API_EVENT() Delegate&, Array&> TestEvent; }; API_CLASS() class GAME_API MyScript : public Script { API_AUTO_SERIALIZATION(); DECLARE_SCRIPTING_TYPE(MyScript); /*API_STRUCT() struct GAME_API InnerStructer { public: float floaty; };*/ //API_FIELD() MyThinger thingey; // [Script] void OnStart() override; void OnEnable() override; void OnDisable() override; void OnUpdate() override; //API_FUNCTION() void Test1(API_PARAM(REF) Array& eenums) {}; //API_FUNCTION() BezierCurve.Keyframe Test2(BezierCurve kef) {}; };