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
| using UnityEditor; | |
| namespace PixelWizards.Utilities | |
| { | |
| public class UnparentGameObject | |
| { | |
| [MenuItem("Edit/Unparent GameObject", false, 0)] | |
| static void UnparentGO() | |
| { | |
| var selection = Selection.activeTransform; |
| using UnityEngine; | |
| namespace PixelWizards.Utilities | |
| { | |
| /// <summary> | |
| /// Destroys this object if we're in play mode. | |
| /// Useful for debug stuff that you don't want in the actual game | |
| /// </summary> | |
| public class DestroyOnPlay : MonoBehaviour | |
| { |
| using UnityEngine; | |
| public class DontDestroyOnLoad : MonoBehaviour | |
| { | |
| // Start is called before the first frame update | |
| void Start() | |
| { | |
| DontDestroyOnLoad(this); | |
| } | |
| } |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| namespace PixelWizards.GameSystem.Controllers | |
| { | |
| /// <summary> | |
| /// Spawns any number of prefabs on Awake() when the scene loads | |
| /// </summary> | |
| public class SpawnOnAwake : MonoBehaviour |
| using UnityEngine; | |
| namespace PixelWizards.GameSystem.Controllers | |
| { | |
| /// <summary> | |
| /// Lets us include specific prefabs in multiple scenes and make sure we don't end up with duplicates in the end | |
| /// sort of an inverse singleton pattern. Basically add this to a prefab, then add that prefab into any scene and | |
| /// no matter what only one is ever active | |
| /// </summary> | |
| public class OnlyOneCanSurvive : MonoBehaviour |
| PHP script that uses Unity Publisher API for PHP (https://github.com/LostPolygon/Unity-Publisher-API-PHP) to retrieve new asset sales, put them into a MySQL database, and notify about the sales via e-mail. | |
| Data is inserted into `sales` table, which can be created from sales_table.sql file. Just set up the credentials and put this script on cron with whatever interval you want. Delete the email notification part if you don't need it. | |
| Requires PHP 5.4, php_json extension, and remote socket access. | |
| Also, I know it's ugly, but it does the job and served me well for over a year. |
| // | |
| // QualitySettings/Shadows内のShadow Distance/Shadow Cascades/Cascade splitsをシーンから設定する. | |
| // | |
| // | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| namespace UnityChan | |
| { |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using UnityEngine; | |
| /// <summary> | |
| /// A simple free camera to be added to a Unity game object. | |
| /// | |
| /// Keys: |
| using UnityEditor; | |
| using UnityEngine; | |
| namespace PixelWizards.Utilities | |
| { | |
| public class EditorNote : MonoBehaviour | |
| { | |
| [TextArea] | |
| public string m_Text; | |
| public Vector3 m_Offset; |