Skip to content

Instantly share code, notes, and snippets.

View aiya000's full-sized avatar
🐶
Inu

aiya000 aiya000

🐶
Inu
View GitHub Profile
/**
* Exposes type utility functions.
* @packageDocumentation
*/
/**
* Does `x` have an undefined property `prop`,
* or that property is `PropType`?
*/
export function haveUndefienedPropertyOrThat<
function hasUndefienedPropertyOrThat<
PropType,
Prop extends string,
Base extends { [P in Prop]?: PropType }
>(p: (x: PropType | undefined) => x is PropType, x: Base, prop: Prop): boolean {
return x[prop] === undefined || p(x[prop]);
}
// not nullish
function f(): number {
return 10
}
const x = f() ?? 20 // but ?? can use
console.log(x)
image: node:10.15.0
pipelines:
branches:
default:
- step:
name: Sanity check
caches:
- node
script:
using UdonSharp;
using UnityEngine;
using VRC.Udon.Common.Interfaces;
using VRC.Udon;
/// <summary>
/// Sets a value with network users.
///
/// NOTE:
/// Don't use DoSetValueTo*() directly.
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class PlayPauseAudioSource : UdonSharpBehaviour {
public AudioSource audio;
private bool hasPlayed = false;
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class Switch4OrNothing : UdonSharpBehaviour {
public GameObject first;
public GameObject second;
public GameObject third;
public GameObject fourth;
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class Switch4OrNothing : UdonSharpBehaviour {
public GameObject first;
public GameObject second;
public GameObject third;
public GameObject fourth;
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class MirroSwitchMock : UdonSharpBehaviour {
public GameObject mirror;
public override void Interact() {
if (this.mirror == null) {
public class Test {
public static void main(String[] args) {
float[] xs = new float[32];
xs[5] = 10.0f;
for (float x : xs) {
System.out.println(x);
}
}
}