demo_ar_unity/Assets/FlutterUnityIntegration/Demo/GameManager.cs
2025-03-18 09:34:42 +07:00

39 lines
870 B
C#
Executable File

using System;
using System.Collections;
using System.Collections.Generic;
using FlutterUnityIntegration;
using UnityEngine;
public class GameManager : MonoBehaviour
{
// Start is called before the first frame update
// Start is called before the first frame update
void Start()
{
gameObject.AddComponent<UnityMessageManager>();
}
// Update is called once per frame
void Update()
{ }
void HandleWebFnCall(String action)
{
switch (action)
{
case "pause":
Time.timeScale = 0;
break;
case "resume":
Time.timeScale = 1;
break;
case "unload":
Application.Unload();
break;
case "quit":
Application.Quit();
break;
}
}
}