<div id="panelContainer">
<div id="panelTitle">Title</div>
<div id="panelBody">Body</div>
</div>
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
// Copyright (c) 2023 Tomasz Stachowiak | |
// | |
// This contribution is dual licensed under EITHER OF | |
// | |
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0) | |
// MIT license (http://opensource.org/licenses/MIT) | |
// | |
// at your option. | |
#include "/inc/frame_constants.hlsl" |
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 UnityEngine; | |
public class Flicker : MonoBehaviour | |
{ | |
public string LightStyle = "mmamammmmammamamaaamammma"; | |
private Light light; | |
public float loopTime = 2f; | |
[SerializeField] | |
private int currentIndex = 0; |
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.Linq; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
using UnityEngine.AddressableAssets; | |
using UnityEngine.ResourceManagement.AsyncOperations; | |
using UnityEngine.ResourceManagement.ResourceLocations; | |
using UnityEngine.ResourceManagement.ResourceProviders; | |
public sealed class AddressablesDownloader | |
{ |
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; | |
using System.Collections.Generic; | |
using Newtonsoft.Json; | |
using UnityEngine; | |
namespace Core.Utilities | |
{ | |
/// <summary> | |
/// To extend Unity's serialization process. | |
/// Unity cant serializes inheritance properly e.g in a list of base types, adding an inherited class won’t be serialized as it. |
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 code ----------- | |
float health = 5; | |
CooldownManager.Cooldown(2, () => health++); //Delay health increment by 2 seconds | |
CooldownManager.Cooldown(5, Shoot); //Invoke shoot in 5 seconds | |
void Shoot () { } | |
//If you dont want to use lambda's for functions with parameters you can overload the function like so: | |
CooldownManager.Cooldown(2, Damage, 5); //Calls Damage() function with damageValue 5 after 2 seconds have passed |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
#if UNITY_2017_4 || UNITY_2018_2_OR_NEWER | |
using UnityEngine.U2D; | |
#endif | |
using Sprites = UnityEngine.Sprites; | |
#if UNITY_EDITOR |
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.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
namespace ScriptedAnim | |
{ | |
// Hide from Add Component menu | |
[AddComponentMenu( "" )] | |
public class ScriptedAnimations : 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
using DG.Tweening; | |
using TMPro; | |
using UnityEngine; | |
using UnityEngine.UI; | |
// Attach this component to a UI object which will be the tooltip visual | |
// Must include some text somewhere of course, and optionally a CanvasGroup if you want fading | |
public class TooltipPanel : MonoBehaviour { | |
[Tooltip("The text object which will display the tooltip string")] | |
public TextMeshProUGUI tooltipText; |
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 UnityEngine; | |
using UnityEditor; | |
using UnityEditor.ShortcutManagement; | |
namespace PixelWizards.Utilities | |
{ | |
// This causes the class' static constructor to be called on load and on starting playmode | |
[InitializeOnLoad] | |
class PhysicsSettler |
NewerOlder