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 Sirenix.OdinInspector; | |
using UnityEngine; | |
namespace VisualNovelFramework | |
{ | |
public class VNDialogueController : MonoBehaviour | |
{ | |
[SerializeField] | |
private TMPShakeParser shakeParser = null; | |
[SerializeField] |
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
#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")] |
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
*.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 ### |
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
// Rebinding using InputSystem from Prokuv'o | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.InputSystem; | |
public class Rebinder : MonoBehaviour |
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
// 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; |
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; | |
namespace VariableChangedEventPattern | |
{ | |
class Program | |
{ | |
private static void Main() | |
{ | |
Game.Score.Changed += OnScoreChanged; | |
Game.Score.Value += 200; |
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 Sirenix.OdinInspector.Editor; | |
using Sirenix.Utilities; | |
using Sirenix.Utilities.Editor; | |
using UnityEditor; | |
public class DbBrowser : OdinMenuEditorWindow | |
{ | |
[MenuItem("Db/Browser")] | |
public static void Open() | |
{ |
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
#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; |
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
// 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: |
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
// 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; |