This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Original code[1] Copyright (c) 2022 Shane Celis[2] | |
Licensed under the MIT License[3] | |
[1]: https://gist.github.com/shanecelis/b6fb3fe8ed5356be1a3aeeb9e7d2c145 | |
[2]: https://twitter.com/shanecelis | |
[3]: https://opensource.org/licenses/MIT | |
*/ | |
using UnityEngine; | |
using UnityEngine.UIElements; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Drawing a line with UITK https://forum.unity.com/threads/drawing-a-line-with-uitk.1193470/ | |
public class LineDrawer : VisualElement | |
{ | |
private Vector3 startPos, endPos; | |
private float thickness; | |
public LineDrawer(Vector3 pos1, Vector3 pos2, float width) | |
{ | |
startPos = pos1; | |
endPos = pos2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.XR; | |
using Valve.VR; | |
/// <summary> | |
/// These are a few different ways to detect the current VR HMD and controller type. | |
/// - Unity XR api | |
/// - Unity Input api | |
/// - SteamVR plugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.IO; | |
using System.Net; | |
using System.Text; | |
/* EXAMPLE USAGE | |
FileDownloader fileDownloader = new FileDownloader(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
CSVReader by Dock. (24/8/11) | |
http://starfruitgames.com | |
usage: | |
CSVReader.SplitCsvGrid(textString) | |
returns a 2D string array. | |
Drag onto a gameobject for a demo of CSV parsing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef UNITY_CG_INCLUDED | |
#define UNITY_CG_INCLUDED | |
#include "UnityShaderVariables.cginc" | |
#if SHADER_API_FLASH | |
uniform float4 unity_NPOTScale; |