This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Fix Old Asset Store Links | |
// @version 1 | |
// @include https://www.assetstore.unity3d.com/* | |
// @grant none | |
// ==/UserScript== | |
// get current url | |
var URL = window.location.href; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#define SHADER_COMPILATION_LOGGING | |
//#define SKIP_SHADER_COMPILATION | |
using System.Collections.Generic; | |
using UnityEditor.Build; | |
using UnityEditor.Rendering; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
public class ShaderStripper : IPreprocessShaders |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MeshDestroy : MonoBehaviour | |
{ | |
private bool edgeSet = false; | |
private Vector3 edgeVertex = Vector3.zero; | |
private Vector2 edgeUV = Vector2.zero; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using ExitGames.Client.Photon; | |
using Photon.Pun; | |
using Photon.Realtime; | |
using UnityEngine; | |
/// <summary> | |
/// PhotonNetwork Timer, using Photon Events(RaiseEvents). | |
/// Call Initialize() as soon as the Timer should react to Photon Callbacks(RaiseEvents), Deinitialize if not needed. | |
/// Every Client should Update the Timer : timer.Update(Time.deltaTime) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example Scriptable Object. Instance must be placed in Resources folder and have the same name as the class, type of generic parameter must be your class. | |
using UnityEngine; | |
[CreateAssetMenu(fileName = "MySingletonSO")] | |
public class MySingletonSO : SingletonScriptableObject<MySingletonSO> | |
{ | |
// Here goes your data. This class can be called by the static Instance property, which will automatically locate the instance in the Resources folder. | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class CallAfterDelay : MonoBehaviour | |
{ | |
float delay; | |
System.Action action; | |
// Will never call this frame, always the next frame at the earliest | |
public static CallAfterDelay Create( float delay, System.Action action) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#define TMP_DEBUG_MODE | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using UnityEngine.Events; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
#if UNITY_EDITOR || DEBUG | |
using System; | |
using UnityEngine.SceneManagement; | |
#endif | |
public class SingletonMonoBehaviour<T> : MonoBehaviour where T : MonoBehaviour { | |
private static T _instance = null; | |
public static T Instance { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Photon Methods | |
**public class Blank : Photon.PunBehaviour** | |
instead of mono behavior, use this to receive photon callbacks in your script. | |
**public override void OnLeftRoom()** | |
An example of overriding a punbehavior callback |