rj-action-library/Runtime/Scenes/Serializer/SerializeScene.cs

30 lines
485 B
C#
Raw Normal View History

2025-07-18 07:52:32 +00:00
using System;
using System.Collections.Generic;
using System.Reflection;
using Godot;
namespace Rokojori
{
[Tool]
[GlobalClass]
public partial class SerializeScene:Action
{
[Export]
public Node root;
[Export]
public string outputPath;
protected override void _OnTrigger( )
{
var serializedScene = new SerializedScene();
serializedScene.Serialize( root, [ this ] );
FilesSync.SaveJSON( outputPath, serializedScene );
}
}
}