Skip to content

Instantly share code, notes, and snippets.

View PranavSK's full-sized avatar

Pranav Koundinya PranavSK

  • Zendesk
  • Bangalore
  • 11:04 (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;
}
func get_all_files(path: String, file_ext := "", files := []):
var dir = Directory.new()
if dir.open(path) == OK:
dir.list_dir_begin(true, true)
var file_name = dir.get_next()
while file_name != "":
if dir.current_is_dir():