Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Profiling;
using UnityEngine.UI;
using System.Text;
using Unity.Profiling.LowLevel.Unsafe;
public class ReleaseBuildRecordCheck : MonoBehaviour
{
@ArieLeo
ArieLeo / .readme.md
Created December 14, 2022 07:20 — forked from andrew-raphael-lukasik/.UniversalTurretComponent.cs.md
basic turret with limited gimbal range

basic turret with limited gimbal range

@ArieLeo
ArieLeo / .readme.md
Created December 14, 2022 07:20 — forked from andrew-raphael-lukasik/.SunController.cs.md
basic sun controller script

basic sun controller

@ArieLeo
ArieLeo / .preview.md
Created December 14, 2022 06:19 — forked from andrew-raphael-lukasik/.GpuInstancingForGameObjects.cs.md
GPU Instancing for GameObjects

GPU Instancing for GameObjects

frustum culling, multiple materials are being segregated into batches with their own AABB:

@ArieLeo
ArieLeo / RaymarchSDF.hlsl
Created December 12, 2022 09:33 — forked from Anthelmed/RaymarchSDF.hlsl
A Texture3D SDF function to be used inside Unity shader graph
#ifndef RAYMARCHSDFINCLUDE_INCLUDED
#define RAYMARCHSDFINCLUDE_INCLUDED
#define STEPS 256
#define MAX_DISTANCE 500
#define MIN_DISTANCE 0.001
#if !SHADERGRAPH_PREVIEW
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
/*
MIT License
Copyright (c) 2022 FIGHT4DREAM LIMITED
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
/*
A simple little editor extension to copy and paste all components
Help from http://answers.unity3d.com/questions/541045/copy-all-components-from-one-character-to-another.html
license: WTFPL (http://www.wtfpl.net/)
author: aeroson
advise: ChessMax
editor: frekons
*/
#if UNITY_EDITOR
@ArieLeo
ArieLeo / concave_object_to_convex_objects_by_face.py
Created April 8, 2022 14:39 — forked from GuyPaddock/concave_object_to_convex_objects_by_face.py
Blender 2.91 Script for Convex Hull Decomposition into Separate Shapes Using Blender's Convex using "Split Concave Faces"
##
# A script to split simple, architectural geometry into convex pieces.
#
# This script makes use of Blender's built-in "Split Concave Faces" clean-up
# algorithm to break-up the faces of an object into convex pieces. The script
# attempts to identify all the edges that represent convex boundaries, and then
# it splits objects up along those edges. Each resulting piece is then made into
# a closed object by converting it into a convex hull.
#
# Be sure to select the object you wish the split into convex pieces before
@ArieLeo
ArieLeo / FloatingOrigin.cs
Created April 5, 2022 18:19 — forked from brihernandez/FloatingOrigin.cs
Floating origin to handle large worlds in Unity.
// Based on the Unity Wiki FloatingOrigin script by Peter Stirling
// URL: http://wiki.unity3d.com/index.php/Floating_Origin
using UnityEngine;
using UnityEngine.SceneManagement;
public class FloatingOrigin : MonoBehaviour
{
[Tooltip("Point of reference from which to check the distance to origin.")]
public Transform ReferenceObject = null;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class AnimatorPanel : MonoBehaviour
{
[SerializeField] Animator _animator;
[SerializeField] Button _button;
void Start()