A SceneReference wrapper class that uses ISerializationCallbackReceiver and a custom PropertyDrawerto provide safe, user-friendly scene references in scripts.
![alt text][1]
| # Unity | |
| *.cs diff=csharp text | |
| *.cginc text | |
| *.shader text | |
| # Unity YAML | |
| *.mat merge=unityyamlmerge eol=lf | |
| *.anim merge=unityyamlmerge eol=lf |
A SceneReference wrapper class that uses ISerializationCallbackReceiver and a custom PropertyDrawerto provide safe, user-friendly scene references in scripts.
![alt text][1]
| using UnityEngine; | |
| using UnityEditor; | |
| using UnityEditor.SceneManagement; | |
| using UnityEngine.SceneManagement; | |
| // From https://gist.github.com/JohannesDeml/5802473b569718c9c86de906b7039aec | |
| // Original https://gist.github.com/ulrikdamm/338392c3b0900de225ec6dd10864cab4 | |
| // Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser). | |
| // This opens an empty scene with your prefab where you can edit it. | |
| // Put this script in your project as Assets/Editor/EditPrefab.cs |
| Shader "Name" { | |
| Properties { | |
| _Name ("display name", Range (min, max)) = number | |
| _Name ("display name", Float) = number | |
| _Name ("display name", Int) = number | |
| _Name ("display name", Color) = (number,number,number,number) | |
| _Name ("display name", Vector) = (number,number,number,number) |
| using System; | |
| using System.Collections.Generic; | |
| using Entitas; | |
| public class CompositeSystem : Systems { | |
| IContexts contexts; | |
| public CompositeSystem(IContexts contexts) { | |
| this.contexts = contexts; | |
| } |
| tool | |
| extends EditorScript | |
| const UE4_ASSETS_PATH: = "res://prefabs" | |
| const UE4_ASSET_EXT: = "FBX" | |
| const MATERIALS_STORE_PATH: = "res://materials" | |
| const MATERIALS_STORE_EXT: = "tres" | |
| const SCENE_STORE_PATH: = "res://prefabs" | |
| const SCENE_STORE_EXT: = "tscn" |
| extends Spatial | |
| onready var camera_arm: = $Arm | |
| export(float) var move_speed: = 10 | |
| export(float) var move_weight: = 3.2 | |
| export(float) var rotate_speed: = 1 | |
| export(float) var rotate_weight: = 5.1 | |
| export(Vector3) var up_dir: = Vector3.UP |
| tool | |
| extends ShaderMaterial | |
| class_name StylizedMaterial | |
| """ | |
| """ | |
| enum BlendMode {MIX, ADD, SUB, MUL} | |
| enum DepthDrawMode {OPAQUE_ONLY, ALWAYS, DISABLED, ALPHA_OPAQUE_PREPASS} | |
| enum CullMode {BACK, FRONT, DISABLED} | |
| enum CelPrimaryMode {NONE, SINGLE, MULTI} |
| cmd /e:on /v:on /c "for %f in ("* *.exe") do (set "n=%~nxf" & set "n=!n: =_!" & ren "%~ff" "!n!" )" |
| function exa | |
| command exa --git --group-directories-first --sort=name $argv | |
| end |