/
v1.3 Example 4 - Scripting Setup
Private & Confidential
v1.3 Example 4 - Scripting Setup
An example scene demonstrating how to create remove the Igloo camera from your scene during runtime.
On the Example GameObject there is a script called IglooExample1.cs and it contains the code for destroying and re-creating the Igloo Camera System during runtime.
The Igloo Example gameObject
using UnityEngine;
using Igloo.Common;
/// <summary>
/// An Example of Creating and Destroying the Igloo Camera System
/// </summary>
public class IglooExample1 : MonoBehaviour
{
/// <summary>
/// Mono Start Function, Executed during the Global Start Event
/// </summary>
public void Start()
{
if (IglooManager.instance == null) Debug.LogError("<b>[Igloo]</b> Igloo Manager must be added to the Scene");
}
/// <summary>
/// Create an Igloo by calling CreateIgloo() within the Igloo Manager Class
/// </summary>
public void CreateIgloo()
{
IglooManager.instance.CreateIgloo();
}
/// <summary>
/// Destroy an Igloo Camera System by calling RemoveIgloo() within the Igloo Manager Class
/// </summary>
public void RemoveIgloo()
{
IglooManager.instance.RemoveIgloo();
}
}
Destroying and re-creating the Igloo camera system uses the same settings file. It will always re-create whatever camera is saved in settings.
If you are attempting to change the camera system to a diffferent one, it will need to be destroyed then have the settings altered, then re-created.
This is how the Igloo Settings Menu works in Example 6
Related content
v1.3 Scripting Reference
v1.3 Scripting Reference
More like this
v1.3 Example 3 - Player System
v1.3 Example 3 - Player System
Read with this
v1.2.21 Example 4 - Scripting Setup
v1.2.21 Example 4 - Scripting Setup
More like this
Warp&Blend Output
Warp&Blend Output
Read with this
v1.3 Example 2 - Igloo Prefab
v1.3 Example 2 - Igloo Prefab
More like this
v1.3 Example 1 - Basic
v1.3 Example 1 - Basic
More like this
(c) Igloo Vision 2020