Skip to content

Instantly share code, notes, and snippets.

View bo11ox's full-sized avatar
🏴󠁧󠁢󠁳󠁣󠁴󠁿
:rage4:

Rainer Strobo bo11ox

🏴󠁧󠁢󠁳󠁣󠁴󠁿
:rage4:
  • FFM/Germany
View GitHub Profile
using Sirenix.OdinInspector;
using UnityEngine;
namespace VisualNovelFramework
{
public class VNDialogueController : MonoBehaviour
{
[SerializeField]
private TMPShakeParser shakeParser = null;
[SerializeField]
#if UNITY_EDITOR
namespace Sirenix.OdinInspector.Demos.RPGEditor
{
public class ConsumableItem : Item
{
[SuffixLabel("seconds ", true)]
[BoxGroup(STATS_BOX_GROUP)]
public float Cooldown;
[HorizontalGroup(STATS_BOX_GROUP + "/Dur")]
@mstevenson
mstevenson / .gitattributes
Last active March 6, 2023 16:31
Git configuration files for Unity projects
*.cs diff=csharp
# Macro attribute, linguist-generated means the file is ignored for the
# repository's language statistics and diffs are hidden by default
[attr]unity-yaml-file -text -merge=unityamlmerge linguist-generated
# Macro attribute for LFS files
[attr]lfs-file filter=lfs diff=lfs merge=lfs -text
### Unity YAML Files ###
// Rebinding using InputSystem from Prokuv'o
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class Rebinder : MonoBehaviour
@brihernandez
brihernandez / FloatingOrigin.cs
Last active February 21, 2025 01:01
Floating origin to handle large worlds in Unity.
// Based on the Unity Wiki FloatingOrigin script by Peter Stirling
// URL: http://wiki.unity3d.com/index.php/Floating_Origin
using UnityEngine;
using UnityEngine.SceneManagement;
public class FloatingOrigin : MonoBehaviour
{
[Tooltip("Point of reference from which to check the distance to origin.")]
public Transform ReferenceObject = null;
@Quickz
Quickz / VariableChangedEventPattern.cs
Created March 3, 2020 18:50
A generic variable wrapper that allows detecting value changes.
using System;
namespace VariableChangedEventPattern
{
class Program
{
private static void Main()
{
Game.Score.Changed += OnScoreChanged;
Game.Score.Value += 200;
using Sirenix.OdinInspector.Editor;
using Sirenix.Utilities;
using Sirenix.Utilities.Editor;
using UnityEditor;
public class DbBrowser : OdinMenuEditorWindow
{
[MenuItem("Db/Browser")]
public static void Open()
{
@Froghut
Froghut / OdinWatchWindow.cs
Last active January 25, 2025 07:31
Odin Watch Window
#if ODIN_INSPECTOR
using System;
using System.Collections.Generic;
using System.Linq;
using Sirenix.OdinInspector.Editor;
using Sirenix.Utilities;
using Sirenix.Utilities.Editor;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
@sabresaurus
sabresaurus / PaletteWindow.cs
Last active September 27, 2023 19:50
Palette window with drag-drop boxes that you can drag common objects onto such as scenes, materials, prefabs to easily access them later (From SabreCSG originally)
// MIT License
//
// Copyright (c) 2021 Sabresaurus
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@unitycoder
unitycoder / ContinueCoroutine.cs
Created June 18, 2019 19:27
Continue CoRoutine After Gameobject was disabled and then enabled (with .setActive)
// example script for restarting Coroutine after gameobject was disabled (and continue from previous timer value)
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
public class ContinueCoroutine : MonoBehaviour
{
public float duration = 5f;