Skip to content

Instantly share code, notes, and snippets.

View gekidoslair's full-sized avatar
💭
Surfing the Chaos

Mike Wuetherick gekidoslair

💭
Surfing the Chaos
View GitHub Profile
@gekidoslair
gekidoslair / CharController.cs
Last active July 12, 2023 03:50
Camera-relative character movement controller. Does not handle animation, but has some comments where you'd want to add the hooks
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace PixelWizards.GameSystem.Controllers
{
// the data model for the character controller. I like to keep vars like this in a separate class to organize them
// and keep the main controller script as clean as possible.
// because it is set to be serializable, these vars are exposed in the editor (except where noted) when you attach
// the CharController component to your character
using UnityEngine;
using System.Collections;
public class RoamBetweenPoints : MonoBehaviour {
public Transform[] targets;
public LayerMask groundLayer;
private Transform target;
private NavMeshAgent agent;
@gekidoslair
gekidoslair / UnityGuidRegenerator.cs
Created January 11, 2017 04:50 — forked from ZimM-LostPolygon/UnityGuidRegenerator.cs
Unity asset GUIDs regenerator
// Drop into Assets/Editor, use "Tools/Regenerate asset GUIDs"
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
namespace UnityGuidRegenerator {
public class UnityGuidRegeneratorMenu {
{
"air_force_blue_raf": {
"name": "Air Force Blue (Raf)",
"hex": "#5d8aa8",
"rgb": [93, 138, 168]
},
"air_force_blue_usaf": {
"name": "Air Force Blue (Usaf)",
"hex": "#00308f",
"rgb": [0, 48, 143]
@gekidoslair
gekidoslair / gist:dbbe29f37c46ca37d3a1
Created October 19, 2014 06:12
Parsing JSON into C# objects in Unity
public class CommunicationLayer : Monobehavior
{
public string response_message;
string baseAPIEndpoint = ClientConstants.GAMESERVER_URL; // base url for your API endpoints
/// <summary>
/// Sends a Generic API call. should be done via coroutine
/// </summary>
/// <returns>The API call.</returns>
/// <param name="endpoint">Endpoint we are wanting to hit</param>