Comments (2)
This is a current limitation, please see:
from godot.
Duplicate of:
See:
This is not a bug. Arrays are passed by reference; they do not copy the entire content. Otherwise you would get:
var a: Array[Node2D]
var b: Array[Node]
b = a # Now `b` refers to the same array as `a`.
b.append(Label.new()) # Valid, `Label` is a subtype of `Node`.
print(a[0]) # Invalid, `Label` is **not** a subtype of `Node2D`.
Probably the only way this would work is if the GDScript supported read
/write
qualifiers. But it's too difficult.
Thanks for the contribution nonetheless!
from godot.
Related Issues (20)
- Crash In Node3DEditorViewport Selecting On Empty Scene
- World Grid Glitch HOT 1
- Mesh with skeleton and animation crashes on Android (PowerVR) HOT 13
- AStarGrid2D allow_partial_path returning no path when there should be HOT 4
- Opening a script in external editor(cursor/vscode) crashes HOT 4
- The built-in script editor opens scripts in external editor HOT 2
- Crash loading godot-demo-projects/2d/dodge_the_creeps HOT 2
- The issue of transmittance and refractive index of glass materials for mobile devices HOT 1
- 9 Patch editor in StyleBoxTexture does not work as expected HOT 3
- `AudioStreamPlayer3D.is_playing()` spams "Parameter p_playback is null" HOT 5
- Black get_texture() from viewport on desktop, works fine on mobile. HOT 4
- `--import` still produces errors `SCRIPT ERROR: Parse Error: Could not find base class` HOT 1
- _UnhandledInput @event.IsActionPressed() is not capturing continuous input HOT 3
- Type casting may cause property access error with custom resource HOT 2
- Button size being inherited from the theme unexpectedly 4.3 beta HOT 10
- Unable to connect signal to callback with binds if script extends another with callback defined - 4.3 beta 1 HOT 1
- FlowContainer Scale also scales the wrap breakpoint HOT 3
- Project Manager reports "Update Available" when on latest 4.3 beta version HOT 3
- Build error in VS 2022 HOT 1
- find_child method doesn't find a child by name after changing it's parent HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.