This file contains 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 UnityEditor; | |
namespace PixelWizards.Utilities | |
{ | |
public class UnparentGameObject | |
{ | |
[MenuItem("Edit/Unparent GameObject", false, 0)] | |
static void UnparentGO() | |
{ | |
var selection = Selection.activeTransform; |
This file contains 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; | |
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 | |
{ |
This file contains 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; | |
public class DontDestroyOnLoad : MonoBehaviour | |
{ | |
// Start is called before the first frame update | |
void Start() | |
{ | |
DontDestroyOnLoad(this); | |
} | |
} |
This file contains 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.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 |
This file contains 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; | |
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 |
This file contains 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
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. |
This file contains 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
// | |
// QualitySettings/Shadows内のShadow Distance/Shadow Cascades/Cascade splitsをシーンから設定する. | |
// | |
// | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace UnityChan | |
{ |
This file contains 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.Generic; | |
using System.Linq; | |
using System.Text; | |
using UnityEngine; | |
/// <summary> | |
/// A simple free camera to be added to a Unity game object. | |
/// | |
/// Keys: |
This file contains 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 UnityEditor; | |
using UnityEngine; | |
namespace PixelWizards.Utilities | |
{ | |
public class EditorNote : MonoBehaviour | |
{ | |
[TextArea] | |
public string m_Text; | |
public Vector3 m_Offset; |