Skip to content

Instantly share code, notes, and snippets.

@Kroporo
Kroporo / WordOfTheDayText.cs
Created February 27, 2023 13:41
This gets the word of the day and writes it into a few Text boxes. It's designed to be a small gimmick, though due to licensing with Dictionary.com... This can not be used in any commercial product 💤
using System;
using System.Collections;
using TMPro;
using UnityEngine;
using UnityEngine.Networking;
public class WordDefinitionText : MonoBehaviour {
public TMP_Text wordText;
public TMP_Text typeText;
public TMP_Text definitionText;
@Kroporo
Kroporo / OpenXRRestarterKiller.cs
Created November 15, 2022 15:10
Workaround to console spam caused by `OpenXRRestarter` introduced in `[email protected]` -> "Failure to restart OpenXRLoader after shutdown"
using UnityEngine;
using UnityEditor;
using System.Reflection;
using System;
// This class finds and kills a coroutine that throws errors inside the editor every 5 seconds if no headset is connected
// The coroutine was introduced in the OpenXR Plugin [1.5.1] - 2022-08-11
// There absolutely has to be a better way, and this code should NOT be maintained incase the issue is resolved
public class OpenXRRestarterKiller : MonoBehaviour {
private static bool isHookedIntoUpdate = false;