GodotStringIntercept 1.1.0
dotnet add package GodotStringIntercept --version 1.1.0
NuGet\Install-Package GodotStringIntercept -Version 1.1.0
<PackageReference Include="GodotStringIntercept" Version="1.1.0" />
<PackageVersion Include="GodotStringIntercept" Version="1.1.0" />
<PackageReference Include="GodotStringIntercept" />
paket add GodotStringIntercept --version 1.1.0
#r "nuget: GodotStringIntercept, 1.1.0"
#:package GodotStringIntercept@1.1.0
#addin nuget:?package=GodotStringIntercept&version=1.1.0
#tool nuget:?package=GodotStringIntercept&version=1.1.0
Godot String Intercept
Generators for StringName and NodePath in Godot 4.
Usage
// Allocates a new StringName every time.
Input.IsActionPressed("move_forward");
// Allocation free!
Input.IsActionPressed("move_forward".AsStringName());
You must add the following to your .csproj file:
<PropertyGroup>
<InterceptorsNamespaces>$(InterceptorsNamespaces);GodotStringIntercept.Interceptors</InterceptorsNamespaces>
</PropertyGroup>
How?
This library generates readonly fields for the values passed to AsStringName()/AsNodePath().
The calls to those methods are then intercepted to simply read the readonly field.
This library also warns whenever you implicitly or explicitly cast a string to a StringName/NodePath.
You should use new StringName()/new NodePath() instead to explicitly allocate a new object.
The warnings are disabled for code in an addons folder.
See the proposal for more info.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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 is compatible. 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. |
-
net10.0
- GodotSharp (>= 4.0.0)
- GodotStringIntercept.Generators (>= 1.1.0)
-
net8.0
- GodotSharp (>= 4.0.0)
- GodotStringIntercept.Generators (>= 1.1.0)
-
net9.0
- GodotSharp (>= 4.0.0)
- GodotStringIntercept.Generators (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.