Tilt Five™ Unity API  1.3.0
 
Loading...
Searching...
No Matches
TiltFiveSingletonHelper.cs
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020-2022 Tilt Five, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16using System.Collections;
17using System.Collections.Generic;
18using UnityEngine;
19
20namespace TiltFive
21{
22 public interface ISceneInfo
23 {
26 Camera GetEyeCamera();
29 }
30
31 public static class TiltFiveSingletonHelper
32 {
33 public static ISceneInfo GetISceneInfo()
34 {
35 TryGetISceneInfo(out var singleplayerSingleton);
36 return singleplayerSingleton;
37 }
38
39 public static bool TryGetISceneInfo(out ISceneInfo sceneInfo)
40 {
41 if (TiltFiveManager2.IsInstantiated)
42 {
43 sceneInfo = TiltFiveManager2.Instance;
44 return true;
45 }
46
47 if (TiltFiveManager.IsInstantiated)
48 {
49 sceneInfo = TiltFiveManager.Instance;
50 return true;
51 }
52
53 sceneInfo = null;
54 return false;
55 }
56 }
57}
The Tilt Five manager.
The Tilt Five manager.
static bool TryGetISceneInfo(out ISceneInfo sceneInfo)
uint GetSupportedPlayerCount()
float GetScaleToUWRLD_UGBD()
Definition: Log.cs:21