New Features
This commit is contained in:
21
Content/Editor/Scripting/CppAssetTemplate.h
Normal file
21
Content/Editor/Scripting/CppAssetTemplate.h
Normal file
@@ -0,0 +1,21 @@
|
||||
%copyright%
|
||||
#pragma once
|
||||
|
||||
#include <Engine/Core/ISerializable.h>
|
||||
#include <Engine/Core/Types/BaseTypes.h>
|
||||
#include <Engine/Content/Assets/Model.h>
|
||||
#include <Engine/Scripting/ScriptingType.h>
|
||||
|
||||
/// <summary>
|
||||
/// %class% Json Asset.
|
||||
/// </summary>
|
||||
API_CLASS() class %module%%class% : public ISerializable
|
||||
{
|
||||
API_AUTO_SERIALIZATION();
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(%class%);
|
||||
public:
|
||||
API_FIELD(Attributes = "Range(0, 20), EditorOrder(0), EditorDisplay(\"Data\")")
|
||||
float FloatValue = 20.0f;
|
||||
API_FIELD(Attributes = "EditorOrder(1), EditorDisplay(\"Data\")")
|
||||
Vector3 Vector3Value = Vector3(0.1f);
|
||||
};
|
||||
10
Content/Editor/Scripting/CppStaticClassTemplate.cpp
Normal file
10
Content/Editor/Scripting/CppStaticClassTemplate.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
%copyright%
|
||||
#include "%filename%.h"
|
||||
#include <Engine/Core/Log.h>
|
||||
|
||||
void %class%::RunNativeAction(Vector4 data)
|
||||
{
|
||||
LOG(Warning, "Data in RunNativeAction: {0}", data.ToString());
|
||||
}
|
||||
|
||||
|
||||
19
Content/Editor/Scripting/CppStaticClassTemplate.h
Normal file
19
Content/Editor/Scripting/CppStaticClassTemplate.h
Normal file
@@ -0,0 +1,19 @@
|
||||
%copyright%
|
||||
#pragma once
|
||||
|
||||
#include <Engine/Scripting/Script.h>
|
||||
#include <Engine/Core/Math/Vector4.h>
|
||||
/// <summary>
|
||||
/// %class% Function Library
|
||||
/// </summary>
|
||||
API_CLASS(Static) class %module%%class%
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_MINIMAL(%class%);
|
||||
public:
|
||||
/// <summary>
|
||||
/// Logs the function parameter natively.
|
||||
/// </summary>
|
||||
/// <param name="data">Vector4 parameter</param>
|
||||
/// <returns>void</returns>
|
||||
API_FUNCTION() void RunNativeAction(Vector4 data);
|
||||
};
|
||||
Reference in New Issue
Block a user