Skip to content

Instantly share code, notes, and snippets.

View dentedpixel's full-sized avatar

Russell Savage dentedpixel

View GitHub Profile
@dentedpixel
dentedpixel / ProceduralCube.cs
Last active March 26, 2018 18:56
A cube mesh created with code including uv mapping mesh and normals
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
[ExecuteInEditMode] // Added to be able to tweak the script without having to hit play ever time
public class ProceduralCube : MonoBehaviour
{
@dentedpixel
dentedpixel / LeanTween Spline Performant
Created March 4, 2016 16:23
An example of showing how to do a LeanTwee.moveSpline with better performance.
using UnityEngine;
using System.Collections;
public class EngineStressTest1 : MonoBehaviour {
private int animateCount = 6000;
private GameObject[] cubes;
private LTSpline[] splines;
@dentedpixel
dentedpixel / LTPathExampleTriggers
Created December 27, 2015 18:11
Trigger Points Along LeanTween Path
using UnityEngine;
using System.Collections;
public class TriggerPointExample : MonoBehaviour{
private GameObject light;
void Awake(){
light = gameObject.transform.Find("Spotlight").gameObject;
light.SetActive( false );
}