Cobilas.Godot.Utility
4.1.2
See the version list below for details.
dotnet add package Cobilas.Godot.Utility --version 4.1.2
NuGet\Install-Package Cobilas.Godot.Utility -Version 4.1.2
<PackageReference Include="Cobilas.Godot.Utility" Version="4.1.2" />
<PackageVersion Include="Cobilas.Godot.Utility" Version="4.1.2" />
<PackageReference Include="Cobilas.Godot.Utility" />
paket add Cobilas.Godot.Utility --version 4.1.2
#r "nuget: Cobilas.Godot.Utility, 4.1.2"
#:package Cobilas.Godot.Utility@4.1.2
#addin nuget:?package=Cobilas.Godot.Utility&version=4.1.2
#tool nuget:?package=Cobilas.Godot.Utility&version=4.1.2
Cobilas Godot Utility
Descripition
The package contains utility classes in csharp for godot engine(Godot3.5)
RunTimeInitialization
(namespace: Cobilas.GodotEngine.Utility.Runtime)
The RunTimeInitialization
class allows you to automate the <kbd>Project>Project Settings>AutoLoad</kbd> option.
To use the RunTimeInitialization
class, you must create a class and make it inherit RunTimeInitialization
.
using Cobilas.GodotEngine.Utility.Runtime;
//The name of the class is up to you.
public class RunTimeProcess : RunTimeInitialization {}
And remember to add the class that inherits RunTimeInitialization
in <kbd>Project>Project Settings>AutoLoad</kbd>.
Remembering that the RunTimeInitialization
class uses the virtual method _Ready()
to perform the initialization of other classes.
And to initialize other classes along with the RunTimeInitialization
class, the class must inherit the Godot.Node
class or some class that inherits Godot.Node
and use the RunTimeInitializationClassAttribute
attribute.
using Godot;
using Cobilas.GodotEngine.Utility.Runtime;
[RunTimeInitializationClass]
public class ClassTest : Node {}
RunTimeInitializationClass
/*
bootPriority: Represents the boot order
{ (enum Priority)values
StartBefore,
StartLater
}
name:The name of the object
subPriority: And the execution priority order.
*/
//RunTimeInitializationClassAttribute(string? name, Priority bootPriority = Priority.StartBefore, int subPriority = 0, bool lastBoot = false)
[RunTimeInitializationClassAttribute(string?, [Priority:Priority.StartBefore], [int:0], [bool:false])]
[RunTimeInitializationClass()]
CoroutineManager
The CoroutineManager
class is responsible for creating and managing coroutines for godot.
How to create a coroutine?
using Godot;
using System.Collections;
using Cobilas.GodotEngine.Utility;
public class ClassTest : Node {
private Coroutine coroutine;
public override void _Ready() {
coroutine = CoroutineManager.StartCoroutine(Corroutine1());
coroutine = CoroutineManager.StartCoroutine(Corroutine2());
coroutine = CoroutineManager.StartCoroutine(Corroutine3());
}
private IEnumerator Corroutine1() {
GD.Print("Zé da manga");
//When the return is null, by default the coroutine is executed as _Process().
yield return null;
}
private IEnumerator Corroutine2() {
GD.Print("Zé da manga");
//When the return is RunTimeSecond the coroutine is executed as _Process() with a pre-defined delay.
yield return new RunTimeSecond(3);
}
private IEnumerator Corroutine3() {
GD.Print("Zé da manga");
When the return is RunTimeSecond the coroutine is executed as _PhysicProcess() with a pre-defined delay.
yield return new FixedRunTimeSecond(3);
}
}
With the IYieldVolatile
interface you can switch coroutine execution between _Process(float)
and _PhysicsProcess(float)
.
IYield Classes
- RunTimeSecond is a framework that allows you to delay your coroutine in seconds. This class inherits
IYieldUpdate
. - FixedRunTimeSecond is a framework that allows you to delay your coroutine in seconds. This class inherits
IYieldFixedUpdate
. - IYieldUpdate is an interface that allows the coroutine to run in the
_Process(float)
function. - IYieldFixedUpdate is an interface that allows the coroutine to run in the
_PhysicsProcess(float)
function. - IYieldVolatile is an interface that allows the coroutine to run in the
Process(float)
or_PhysicsProcess(float)
function. - IYieldCoroutine is the base interface for Yield interfaces.
Stop coroutines
Now to stop a coroutine.
public static void StopCoroutine(Coroutine Coroutine);
public static void StopAllCoroutines();
Other classes
InputKeyBoard
Physics2D
SceneManager
GDDirectory
Gizmos
The Cobilas Godot Utility is on nuget.org
To include the package, open the .csproj
file and add it.
<ItemGroup>
<PackageReference Include="Cobilas.Godot.Utility" Version="4.1.1" />
</ItemGroup>
Or use command line.
dotnet add package Cobilas.Godot.Utility --version 4.1.1
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- Cobilas.Core.Net4x (>= 1.6.1)
- OpenTK (>= 3.3.1)
-
.NETStandard 2.0
- Cobilas.Core.Net4x (>= 1.6.1)
- OpenTK (>= 3.3.1)
-
.NETStandard 2.1
- Cobilas.Core.Net4x (>= 1.6.1)
- OpenTK (>= 3.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
4.7.1 | 112 | 1/24/2025 |
4.6.0 | 99 | 1/19/2025 |
4.5.0 | 93 | 1/16/2025 |
4.4.1 | 87 | 1/14/2025 |
4.4.0 | 82 | 1/13/2025 |
4.3.0 | 106 | 12/26/2024 |
4.2.7 | 101 | 12/23/2024 |
4.2.5 | 118 | 11/18/2024 |
4.2.4 | 102 | 11/17/2024 |
4.2.3 | 104 | 11/14/2024 |
4.2.1 | 119 | 11/14/2024 |
4.2.0 | 113 | 11/13/2024 |
4.1.2 | 114 | 11/13/2024 |
4.1.1 | 115 | 11/11/2024 |
4.1.0 | 105 | 11/7/2024 |
1.7.0 | 123 | 9/30/2024 |
1.6.0 | 112 | 9/27/2024 |
1.5.3 | 115 | 9/24/2024 |
1.5.2 | 155 | 9/17/2024 |
1.5.1 | 136 | 9/15/2024 |
1.3.0 | 140 | 7/7/2024 |
1.2.1 | 213 | 1/2/2024 |
1.2.0 | 141 | 1/1/2024 |
1.1.2 | 145 | 12/31/2023 |
1.1.1 | 135 | 12/30/2023 |
1.1.0 | 137 | 12/29/2023 |
1.0.0 | 123 | 12/29/2023 |