Skip to content

Instantly share code, notes, and snippets.

View Gillissie's full-sized avatar

Todd Gillissie Gillissie

View GitHub Profile
@Gillissie
Gillissie / gist:c56377d973ac4584c9e7a0b1be82b4d5
Created April 28, 2021 01:52
Unity Sprites in the Resources folder, and the ramifications...
THE WORST WAY - DON'T DO THIS
Atlas & Sprites inside of Resources. Effectively negating the purpose of the atlas, although it's still included in the build:
512.2 kb 0.6% Built-in Texture2D: sactx-0-512x1024-DXT5-New Sprite Atlas-d54d9b5f
82.8 kb 0.1% Assets/Resources/Sprites For Atlas/Avatar_009.png
73.2 kb 0.1% Assets/Resources/Sprites For Atlas/Avatar_003.png
66.8 kb 0.1% Assets/Resources/Sprites For Atlas/Avatar_014.png
66.3 kb 0.1% Assets/Resources/Sprites For Atlas/Avatar_002.png
63.5 kb 0.1% Assets/Resources/Sprites For Atlas/Avatar_012.png
63.1 kb 0.1% Assets/Resources/Sprites For Atlas/Avatar_006.png
62.7 kb 0.1% Assets/Resources/Sprites For Atlas/Avatar_016.png
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/*
Simple class to store some data about the analysis of playing a song at a gig.
*/
namespace gilligames
{
LICENSE SYSTEM [2018920 16:14:27] Next license update check is after 2018-09-21T07:13:06
DisplayProgressbar: Unity license
[Package Manager] Server::Start -- Port 56669 was selected
COMMAND LINE ARGUMENTS:
/Applications/Unity 2018.2.3f1/Unity 2018.2.3f1.app/Contents/MacOS/Unity
./BlockFight/Python/build.py
stage=Dev
Shader "Sprites/Blended Unlit"
{
Properties
{
_MainTex ("Main Texture", 2D) = "white" {}
_Color ("Color", Color) = (1,1,1,1)
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
[PerRendererData] _AlphaTex ("External Alpha", 2D) = "white" {}
[PerRendererData] _EnableExternalAlpha ("Enable External Alpha", Float) = 0
<<<<<<< HEAD
duration = JUMP_TIME;
halfDuration = duration * 0.5f;
startTime = Time.time;
=======
while (closest == null && nextList.Count > 0)
{
tileList = nextList;
nextList = new List<Tile>();
foreach (Tile tile in tileList)
// Check for arrow keys to set the orientation of the brush.
if (Input.GetKeyDown(KeyCode.LeftArrow))
{
brush.rotate(-1);
}
if (Input.GetKeyDown(KeyCode.RightArrow))
{
brush.rotate(1);
}
static function createPlane(tileWidth:int,tileDepth:int,spacing:int):Mesh
{
var mesh:Mesh = new Mesh();
var vertices:Vector3[] = new Vector3[(tileWidth + 1) * (tileDepth + 1)];
var triangles:int[] = new int[tileWidth * tileDepth * 2 * 3];
var uvs:Vector2[] = new Vector2[(tileWidth + 1) * (tileDepth + 1)];
var i:int = 0;
var x:int = 0;
var z:int = 0;
var uvOffset:float = 1.0 / (Mathf.Max(tileWidth,tileDepth) + 1);
@Gillissie
Gillissie / gist:891849
Created March 29, 2011 05:22
Unity GUI script
// The main GUI script, attached to the main camera.
@script ExecuteInEditMode();
var guiSkin:GUISkin;
var titleTexture:Texture2D;
var soundOnTexture:Texture2D;
var soundOffTexture:Texture2D;
static var leaderboard:Leaderboard;
static var soundOn:boolean;