# StreamCubemapArray in Godot 4: Identifier not declared in the current scope

StreamCubemapArray is called CompressedCubemapArray in Godot 4. A Godot 3 script that names the old class fails to parse with Identifier "StreamCubemapArray" not declared in the current scope, and Godot 4.7.2 adds Did you mean to use "CompressedCubemapArray"?

Source: https://flockbay.com/godot/streamcubemaparray-in-godot-4/ · Updated 2026-10-30

## What Godot is checking

When GDScript loads a script it resolves every identifier. StreamCubemapArray is not a class in Godot 4, so the analyzer stops with Identifier not declared in the current scope and none of the script runs.

Before it reports the error, the analyzer looks the name up in the Godot 3 to 4 renames table, as long as the project setting debug/gdscript/warnings/renamed_in_godot_4_hint is on. That table maps StreamCubemapArray to CompressedCubemapArray, which is where Did you mean to use "CompressedCubemapArray"? comes from.

The class reference describes CompressedCubemapArray as a cubemap array loaded from a .ccubearray file, a format internal to Godot that the import system creates from other image formats. It inherits CompressedTextureLayered, which inherits TextureLayered; the fix printed that chain and the layered type, LAYERED_TYPE_CUBEMAP_ARRAY.

## Reproduce it

A Godot 3 script that makes a StreamCubemapArray in code, in a Godot 4 project. The scene is one Node with this script.

```
extends Node

func _ready():
	var sky = StreamCubemapArray.new()
	print(sky)

```

## What Godot 4.7.2 prints

```
Godot Engine v4.7.2.stable.mono.official.ed1daf0bf - https://godotengine.org

SCRIPT ERROR: Parse Error: Identifier "StreamCubemapArray" not declared in the current scope. Did you mean to use "CompressedCubemapArray"?
   at: GDScript::reload (res://answers/streamcubemaparray-in-godot-4/repro.gd:4)
ERROR: Failed to load script "res://answers/streamcubemaparray-in-godot-4/repro.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript_resource_format.cpp:46)
```

## Fix it

Use CompressedCubemapArray. The script prints the class, its parent classes, and its layered type.

```
extends Node

func _ready() -> void:
	var sky := CompressedCubemapArray.new()
	print(sky.get_class())
	print("parent: ", ClassDB.get_parent_class("CompressedCubemapArray"))
	print("grandparent: ", ClassDB.get_parent_class("CompressedTextureLayered"))
	print("cubemap array: ", sky.get_layered_type() == TextureLayered.LAYERED_TYPE_CUBEMAP_ARRAY)

```

## What the fixed script prints

```
Godot Engine v4.7.2.stable.mono.official.ed1daf0bf - https://godotengine.org

CompressedCubemapArray
parent: CompressedTextureLayered
grandparent: TextureLayered
cubemap array: true
```

## Run this fix with your agent

Flockbay is the Godot editor with an AI agent built in. Paste this into Flockbay's chat, or into Claude Code or Codex connected to Flockbay over MCP: the agent finds the cause in your project, applies the fix, runs the game headless and reads Godot's output to check it.

```
My Godot project was written for Godot 3 and Godot 4 stops on this: "Parse Error: Identifier "StreamCubemapArray" not declared in the current scope. Did you mean to use "CompressedCubemapArray"?". Port every use to Godot 4. StreamCubemapArray is called CompressedCubemapArray in Godot 4. A Godot 3 script that names the old class fails to parse with Identifier "StreamCubemapArray" not declared in the current scope, and Godot 4.7.2 adds Did you mean to use "CompressedCubemapArray"? Then run the game headless and check Godot's output for errors.
```

## Verified on Godot 4.7.2

Both scripts on this page were run headless on Godot 4.7.2 (4.7.2.stable.mono.official.ed1daf0bf) on 6 October 2026, and the output above is what Godot printed, unedited.

Where the check lives in Godot's source: [gdscript_analyzer.cpp lines 4680 to 4687, the rename hint and the message](https://github.com/godotengine/godot/blob/4.7.2-stable/modules/gdscript/gdscript_analyzer.cpp#L4680), [renames_map_3_to_4.cpp line 1604, StreamCubemapArray to CompressedCubemapArray](https://github.com/godotengine/godot/blob/4.7.2-stable/editor/project_upgrade/renames_map_3_to_4.cpp#L1604), [CompressedCubemapArray class reference](https://github.com/godotengine/godot/blob/4.7.2-stable/doc/classes/CompressedCubemapArray.xml).

## Questions

### What about StreamCubemap?

It took the same rename: the Godot 3 to 4 renames table maps StreamCubemap to CompressedCubemap.

### How do I load one?

CompressedCubemapArray is loaded from a .ccubearray file that the import system creates. Its parent CompressedTextureLayered has a load method and a load_path property that take the path.

Download Flockbay free: Flockbay's agent reads Godot's debugger output and fixes errors like this one in your project, on the official Godot. https://flockbay.com/download/

Related: [StreamTexture in Godot 4: Could not find type "StreamTexture"](/godot/streamtexture-in-godot-4/), [SpatialMaterial in Godot 4: it is StandardMaterial3D now](/godot/spatialmaterial-in-godot-4/), [BakedLightmap in Godot 4: it is LightmapGI now](/godot/bakedlightmap-in-godot-4/), [VisualShaderNodeVectorScalarSmoothStep in Godot 4: Identifier not declared in the current scope](/godot/visualshadernodevectorscalarsmoothstep-in-godot-4/), [Every verified Godot 4 answer](/godot/), [Does Flockbay change my Godot project?](/docs/does-flockbay-change-my-godot-project/)
