You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ConsoleTest : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private MissionPack baseGame = MissionPack.Quake;
|
|
|
|
[SerializeField]
|
|
private string mod, args;
|
|
|
|
[SerializeField]
|
|
private Camera mainCamera;
|
|
|
|
[SerializeField]
|
|
private List<VisualStyle> visualStyles = new List<VisualStyle>();
|
|
|
|
private UniQuake uq;
|
|
|
|
private void Start()
|
|
{
|
|
Debug.Log($"Running in {IntPtr.Size * 8}-bit mode");
|
|
|
|
uq = gameObject.AddComponent<UniQuake>();
|
|
uq.BaseGame = baseGame;
|
|
uq.ModDirectory = mod;
|
|
uq.AdditionalArguments = ParseArgs();
|
|
uq.Camera = mainCamera;
|
|
uq.GameLayer = Layers.Game1;
|
|
uq.ViewModelLayer = Layers.ViewModel1;
|
|
uq.SetVisualStyle(visualStyles[0]);
|
|
}
|
|
|
|
private string[] ParseArgs()
|
|
{
|
|
if (args == null)
|
|
return new string[0];
|
|
|
|
return args.Split(new[] {' ', '\t', '\r', '\n'}, StringSplitOptions.RemoveEmptyEntries);
|
|
}
|
|
}
|