Table of Contents

Class Object_CB_GD_Extension

Namespace
Godot
Assembly
com.cobilas.godot.utility.dll

Extensions for Godot.Object class.

public static class Object_CB_GD_Extension
Inheritance
Object_CB_GD_Extension
Inherited Members

Methods

Print(Object, params object[])

Converts one or more arguments of any type to string in the best way possible and prints them to the console.

Note: Consider using PushError(string) and PushWarning(string) to print error and warning messages instead of Print(params object[]). This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.

public static void Print(this Object N, params object[] args)

Parameters

N Object

The Godot.Node that will be used.

args object[]

The arguments passed will be printed to the console.

Examples

var a = new int[] { 1, 2, 3 };
GD.Print("a", "b", a); // Prints ab[1, 2, 3]

SafelySetScript<T>(Object, Resource)

Permite definir scripts de forma segura.

public static T? SafelySetScript<T>(this Object obj, Resource resource) where T : Object

Parameters

obj Object

O objeto alvo.

resource Resource

O script que será definido.

Returns

T

Retorna o objeto alvo modificado.

Type Parameters

T

O tipo do objeto que será retornado.

SafelySetScript<T>(Object, string)

Permite definir scripts de forma segura.

public static T? SafelySetScript<T>(this Object obj, string resource) where T : Object

Parameters

obj Object

O objeto alvo.

resource string

O script que será definido.

Returns

T

Retorna o objeto alvo modificado.

Type Parameters

T

O tipo do objeto que será retornado.