> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/godotengine/godot/llms.txt
> Use this file to discover all available pages before exploring further.

# Object

# Object

**Inherits:** Base class for all other classes

## Description

Base class for all other classes in the engine. An advanced Variant type. All classes in the engine inherit from Object. Each class may define new properties, methods or signals, which are available to all inheriting classes.

## Key Methods

### free

```gdscript theme={null}
void free()
```

Deletes the object from memory. Pre-existing references to the object become invalid.

### call

```gdscript theme={null}
Variant call(method: StringName, ...)
```

Calls the method on the object and returns the result. Supports a variable number of arguments.

<ParamField path="method" type="StringName">
  The name of the method to call
</ParamField>

### connect

```gdscript theme={null}
Error connect(signal: StringName, callable: Callable, flags: int = 0)
```

Connects a signal by name to a callable. Returns ERR\_INVALID\_PARAMETER if the signal is already connected.

<ParamField path="signal" type="StringName">
  The signal name to connect
</ParamField>

<ParamField path="callable" type="Callable">
  The callable to connect to the signal
</ParamField>

### get

```gdscript theme={null}
Variant get(property: StringName)
```

Returns the Variant value of the given property. Returns null if the property does not exist.

### set

```gdscript theme={null}
void set(property: StringName, value: Variant)
```

Assigns value to the given property. If the property does not exist or types don't match, nothing happens.

## Signals

### property\_list\_changed()

Emitted when property list changes.

## Example Usage

<Tabs>
  <Tab title="GDScript">
    ```gdscript theme={null}
    var my_object = Object.new()
    my_object.set("custom_property", 42)
    var value = my_object.get("custom_property")
    print(value)  # Prints: 42

    # Connect to a signal
    my_object.connect("property_list_changed", func(): print("Properties changed"))
    ```
  </Tab>

  <Tab title="C#">
    ```csharp theme={null}
    var myObject = new GodotObject();
    myObject.Set("custom_property", 42);
    var value = myObject.Get("custom_property");
    GD.Print(value);  // Prints: 42
    ```
  </Tab>
</Tabs>
