Skip to content

Instantly share code, notes, and snippets.

View nicoplv's full-sized avatar

Nicolas Pierre-Loti-Viaud nicoplv

View GitHub Profile
@nicoplv
nicoplv / ClearFxPrefab.cs
Created May 31, 2023 22:47
Script to clear FX prefab
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace Utils
{
public class ClearFxPrefab
{
#region Methods
@nicoplv
nicoplv / Easing.verse
Last active March 20, 2025 08:54
A group of easing functions in Verse
Easing<public> := module :
InSine<public>(t:float)<transacts>:float=
return 1.0 - Cos(t * PiFloat / 2.0)
OutSine<public>(t:float)<transacts>:float=
return Sin(t * PiFloat / 2.0)
InOutSine<public>(t:float)<transacts>:float=
return (Cos(t * PiFloat) - 1.0) / -2.0
InQuad<public>(t:float)<transacts>:float=
@nicoplv
nicoplv / CanvasAtoCanvasB.verse
Created April 16, 2025 12:06
Workaround to make the ui works on console
PlayerUI.RemoveWidget(BufferCanvasA)
PlayerUI.AddWidget(CanvasA, player_ui_slot{InputMode := ui_input_mode.None })
CanvasA.SetEnabled(false)
Sleep(0.25)
CanvasB.SetEnabled(true)
BufferCanvasB := canvas{}
BufferCanvasB.AddWidget(canvas_slot:
Anchors := anchors{Minimum := vector2{X := 0.0, Y := 0.0}, Maximum := vector2{X := 1.0, Y := 1.0}}
Offsets := margin{Top := 0.0, Left := 0.0, Right := 0.0, Bottom := 0.0}
Alignment := vector2{X := 0.5, Y := 0.5}