Skip to content

Instantly share code, notes, and snippets.

View InternalSington.txt
void Awake(){
#region Internal Singleton
[Header("Internal Singleton:"), Tooltip("If True: this becomes a singleton.")]
public bool SetDontDestroyOnLoad = true;
public bool DebugMode = true;
/// <summary>
View UnderstandingUnity.cs
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagment;
using System.Collection;
using System.Collection.Generic;
namespace ZG
//[MenuItem ("testingPhase/${FileName} ")]
public class ${FileName} : MonoBehaviour
ZeredaGames / Enums.cs
Last active Mar 10, 2019
All that I've got so far.
View Enums.cs
public enum PartTypes
ZeredaGames / Singleton.cs
Last active Mar 8, 2019
How i have it set up thus far.
View Singleton.cs
using UnityEngine;
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour
private static T _instance;
private static object _lock = new object();
public static T Instance
ZeredaGames / MyClass.cs
Last active Mar 12, 2019
This is just some examples i found of how to use attribute to clean up the inspector and also make it more user friendly.
View MyClass.cs
using UnityEngine;
public class MyClass : MonoBehaviour
[Header("Text Attributes"), TextArea, Tooltip("A string using the TextArea attribute"), SerializeField]
private string
ZeredaGames / AppQuit.cs
Last active Mar 7, 2019
Building Upon the Playfab examples and the tutorials by InfoGamers.
View AppQuit.cs
using UnityEngine;
using System.Collections;
public class AppQuit : MonoBehaviour, IQuittable {
public void OnQuit() {
Debug.Log ("AppQuit.Quit");
Application.Quit ();
ZeredaGames / Enums.cs
Last active Mar 3, 2019
I've coded out the base of all the pokemon moves. Do require sounds and sprites. Code not 100% complete but its getting close. Is a work in progress
View Enums.cs
namespace ZeredaGamesEngine.Core.Libraries.Games.Pokemon
#region Pokemon
/// <summary>
/// Pokemon Enums.
/// </summary>
public enum PokemonPerminantBoosts
View 79-C# Script-CreateAssetMenuScript.cs.txt
#region using
using UnityEngine;
using UnityEditor;
#region Script
View 78-C# Script-NewBehaviourScriptAdvanced.cs.txt
#region Licencing
Zereda Games
Thamas Bell : (Depricated, but have ownership - Locked out.) (Personal email A) (Personal email B)
View 80-C# Script-NewBehaviourScript.cs.txt
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class #SCRIPTNAME# : MonoBehaviour {
public static #SCRIPTNAME# instance = null;
public #SCRIPTNAME# GetInstance (){
instance = this;