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
// https://twitter.com/Cyanilux/status/1396848736022802435 | |
// Requires a specific shader to read the _PerInstanceData buffer at SV_InstanceID | |
// I use a shader made in Shader Graph, See : https://gist.github.com/Cyanilux/4046e7bf3725b8f64761bf6cf54a16eb | |
// Also note, there's no frustum culling involved in this example. Typically a compute shader is used for this. | |
using UnityEngine; | |
public class DrawGrass : 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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEditor; | |
// Replaces Unity terrain trees with prefab GameObject. | |
// http://answers.unity3d.com/questions/723266/converting-all-terrain-trees-to-gameobjects.html | |
[ExecuteInEditMode] | |
public class TreeReplacerS : EditorWindow { |
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.Generic; | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
namespace MyBox | |
{ | |
public class ColliderGizmo : 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
Shader "Hidden/EdgeDetect" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "" {} | |
} | |
CGINCLUDE | |
#include "UnityCG.cginc" | |
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
// https://twitter.com/Cyanilux/status/1396848736022802435 | |
// Requires a specific shader to read the _PerInstanceData buffer at SV_InstanceID | |
// I use a shader made in Shader Graph, See : https://gist.github.com/Cyanilux/4046e7bf3725b8f64761bf6cf54a16eb | |
// Also note, there's no frustum culling involved in this example. Typically a compute shader is used for this. | |
using UnityEngine; | |
public class DrawGrass : 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 System; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEditor.AddressableAssets; | |
using UnityEditor.AddressableAssets.Settings; | |
using UnityEngine; | |
using UnityEngine.AddressableAssets; |
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
//https://stackoverflow.com/questions/58328209/how-to-make-a-free-fly-camera-script-in-unity-with-acceleration-and-decceleratio | |
// copyright Runette Software Ltd, 2020. All rights reserved | |
using UnityEngine; | |
using UnityEngine.InputSystem; | |
using Zinnia.Pointer; | |
using Zinnia.Cast; | |
public class FlyingCam : MonoBehaviour | |
{ | |
[Header("Constants")] |
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
/// <summary> | |
/// The script gives you choice to whether to build addressable bundles when clicking the build button. | |
/// For custom build script, call PreExport method yourself. | |
/// For cloud build, put BuildAddressablesProcessor.PreExport as PreExport command. | |
/// Discussion: https://forum.unity.com/threads/how-to-trigger-build-player-content-when-build-unity-project.689602/ | |
/// | |
/// License: The MIT License https://opensource.org/licenses/MIT | |
/// </summary> | |
using UnityEditor; | |
using UnityEditor.AddressableAssets; |
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
package async; | |
#if macro | |
import haxe.macro.Context; | |
#end | |
class Async { | |
public static macro function async(expr:haxe.macro.Expr) { | |
expr = Context.storeTypedExpr(Context.typeExpr(expr)); | |
return macro untyped __js__("(async {0})", ${expr})(); |
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; | |
using UnityEngine.UI; | |
public class QualityManager : Singleton<QualityManager> { | |
private int QUALITY_INDEX = 0; | |
public int MIN_FPS = 28; | |
public Text qualityUIText; |
NewerOlder