ar_tourism_flutter_unity/unity/VRProject2/Assets/FlutterUnityIntegration/Demo/GameManager.cs
2025-05-14 17:04:13 +08:00

39 lines
870 B
C#

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;
}
}
}