Skip to content

Instantly share code, notes, and snippets.

View PranavSK's full-sized avatar

Pranav Koundinya PranavSK

  • Zendesk
  • Bangalore
  • 09:05 (UTC +05:30)
View GitHub Profile
@PranavSK
PranavSK / .gitattributes
Last active March 10, 2022 10:08 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
# Unity
*.cs diff=csharp text
*.cginc text
*.shader text
# Unity YAML
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
@PranavSK
PranavSK / README.md
Created October 25, 2018 08:35 — forked from JohannesMP/LICENSE
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.

What is this?

A SceneReference wrapper class that uses ISerializationCallbackReceiver and a custom PropertyDrawerto provide safe, user-friendly scene references in scripts.

![alt text][1]

Why is this needed?

@PranavSK
PranavSK / EditPrefabInScene.cs
Created October 28, 2018 17:41 — forked from JohannesDeml/EditPrefabInScene.cs
Unity editor script for better editing of prefabs. Put in Assets/Editor.
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