Skip to content

Instantly share code, notes, and snippets.

@RabitBox
RabitBox / StateMachine.hpp
Last active May 31, 2023 14:05
StateMachine for C++
#pragma once
#include <vector>
#include <map>
#include <stdexcept>
template<typename TOwner>
class StateMachine {
public:
#pragma region State Class
class State {
using UnityEngine;
using UnityEditor.AssetImporters;
using System.IO;
[ScriptedImporter(1, "lua")]
public class LuaImporter : ScriptedImporter
{
public override void OnImportAsset(AssetImportContext ctx)
{
var text = File.ReadAllText(ctx.assetPath);