Skip to content

Instantly share code, notes, and snippets.

View karljj1's full-sized avatar

Karl Jones karljj1

View GitHub Profile
@emilianavt
emilianavt / IKRunner.cs
Last active February 8, 2024 10:42
This component uses the UnityEngine.LowLevel API to run Final IK things before Unity constraints and particle systems are evaluated.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.LowLevel;
using RootMotion.FinalIK;
// Disable IK and TwistRelaxers and set them on this to have them run before constraints and particle systems are evaluated.
// Only one instance of IKRunner is possible, but it should be easy enough to extend.
// Remember to call Start() on the TwistRelaxers once if they are disabled from the beginning. The IK may also need manual initialization.
@karljj1
karljj1 / EditorBootScene.cs
Created February 11, 2021 14:17
Initializes the localization settings before entering into a scene in play mode
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine.Localization.Settings;
using UnityEngine.SceneManagement;
[InitializeOnLoad]
public static class EditorBootScene
{
static EditorBootScene()
{
@andrew-raphael-lukasik
andrew-raphael-lukasik / .UIDocumentLocalization.cs.md
Last active April 26, 2024 07:50
Text localization script for UIDocument (UI Toolkit @ Unity)

pattern to follow

// NOTE: this class assumes that you designate StringTable keys in label fields (as seen in Label, Button, etc) // and start them all with '#' char (so other labels will be left be)