Skip to content

Instantly share code, notes, and snippets.

Andy Baker andybak

Block or report user

Report or block andybak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ImmediateTest.cs
using UnityEngine;
public static class C
{
public static Camera Cam
{
get { return Camera.main;}
}
View PlayerController.cs
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.XR;
public class PlayerController : MonoBehaviour
{
public Transform Player1Start;
public Transform Player2Start;
View UpdateShaderGraphAssemblyInfo.cs
// <copyright file="UpdateShaderGraphAssemblyInfo.cs" company="BovineLabs">
// Copyright (c) BovineLabs. All rights reserved.
// </copyright>
namespace BovineLabs.Vision.Editor.ShaderGraph
{
using System;
using System.IO;
using System.Linq;
using UnityEditor;
View DataPlotter.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public class DataPlotter : MonoBehaviour {
// Name of the input file, no extension
public string inputfile;
View GradientBaker.cs
using System.Security.Cryptography.X509Certificates;
using UnityEditor;
using UnityEngine;
namespace SDFr
{
public class GradientBaker : MonoBehaviour
{
public Texture3D sdfTexture;
View GrabEvents.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class GrabEvents : MonoBehaviour
{
private OVRGrabbable grabbable;
public UnityEvent StartGrab;
View mapbox-example.cs
var parameters = new Tile.Parameters();
parameters.Fs = MapboxAccess.Instance;
var tileId = Conversions.LatitudeLongitudeToTileId(_lat, _lng, _zoom);
parameters.Id = tileId.Canonical;
// What do I do instead of this?
//parameters.MapId = "mapbox.mapbox-terrain-v2";
var vectorTile = new VectorTile();
vectorTile.Initialize(parameters, () => Callback(0, 0));
View EventTest.cs
using UnityEngine;
using UnityEngine.Events;
public class EventTest : MonoBehaviour
{
public Collider myCollider;
public UnityEvent myEvent;
void OnTriggerEnter(Collider other)
{
View foliage.shader
Shader "Custom/Double Sided Alpha Cutout Fresnet Sphere Normals"
{
// https://docs.unity3d.com/Manual/SL-VertexFragmentShaderExamples.html
// From: https://forum.unity.com/threads/beginner-in-graphics-on-a-quest-to-do-the-foliage-from-the-witness.518842/
Properties
{
_MainTex("Texture", 2D) = "white" {}
_Cutoff("Alpha cutoff", Range(0.0, 1.0)) = 0.4
View MousePitchYaw.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// From https://forum.unity.com/threads/is-unity-2018-xr-enough.566410/
public class MousePitchYaw : MonoBehaviour {
public KeyCode requiredModifier = KeyCode.None;
You can’t perform that action at this time.