Skip to content

Instantly share code, notes, and snippets.

View mehrdad-ataee's full-sized avatar

Mehrdad Ataee mehrdad-ataee

View GitHub Profile
@josephbk117
josephbk117 / ReflectionProbeAccess.shader
Created November 18, 2018 18:51
Reflection Probe In Custom Unity Shader
/*Please do support www.bitshiftprogrammer.com by joining the facebook page : fb.com/BitshiftProgrammer
Legal Stuff:
This code is free to use no restrictions but attribution would be appreciated.
Any damage caused either partly or completly due to usage this stuff is not my responsibility*/
Shader "BitshiftProgrammer/ReflectionProbeAccess"
{
Properties
{
_Roughness("Roughness", Range(0.0, 10.0)) = 0.0
}
@hasanbayatme
hasanbayatme / MinMax.cs
Last active October 11, 2025 15:47
Unity Min Max Slider Implementation
using System;
using UnityEngine;
[Serializable]
public struct MinMax
{
[SerializeField]
private float min;
[SerializeField]
@silvesthu
silvesthu / VtxAniExport.ms
Last active April 9, 2022 13:10
Vertex Animation Export Maxscript
macroScript VtxAniExport
category: "VertexAnimation"
-- Export texture and a set of parameters to enable vertex animation
-- Reference: https://github.com/apras/Unity-VertexTextureFetchAnimation/blob/master/Assets/Model/VTF.ms
-- Reference: https://docs.unrealengine.com/latest/INT/Engine/Animation/Tools/VertexAnimationTool/
(
rollout _rollout "Vertex Animation Export"
(
label objectName "Object" align:#center
@ProGM
ProGM / ExampleBehavior.cs
Created October 19, 2016 10:39
A PropertyDrawer to show a popup field with a generic list of string for your Unity3d attribute
public class MyBehavior : MonoBehaviour {
// This will store the string value
[StringInList("Cat", "Dog")] public string Animal;
// This will store the index of the array value
[StringInList("John", "Jack", "Jim")] public int PersonID;
// Showing a list of loaded scenes
[StringInList(typeof(PropertyDrawersHelper), "AllSceneNames")] public string SceneName;
}
@wojteklu
wojteklu / clean_code.md
Last active November 8, 2025 12:41
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules