12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System;
- using System.Reflection;
- using UnityEngine;
- using UnityEngine.Playables;
- public class GameStart : MonoBehaviour
- {
- public ShaderVariantCollection ShaderVariantCollection;
- public LoadType LoadType;
- public string h5Url;
- private GameStartUIPanel _gameStartUIPanel;
- [ContextMenu("asdada")]
- public void Test()
- {
-
- }
- public void Start()
- {
- ShaderVariantCollection.WarmUp();
- _gameStartUIPanel = GetComponent<GameStartUIPanel>();
- StartLoadGame();
- }
- private void StartLoadGame()
- {
- string typeName = "GameApplction";
- // lock (ActivatorLoock)
- {
- Assembly assembly = Assembly.Load("Fort23.Mono");
- System.Type type = assembly.GetType(typeName);
- IGameStart iGameStart = System.Activator.CreateInstance(type) as IGameStart;
- iGameStart.StartGame(LoadType, h5Url, _gameStartUIPanel, delegate { gameObject.SetActive(false); });
- }
- }
- }
|