question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

public lateinit Vector2 is unassigned if has a value of 0,0 in Godot editor

See original GitHub issue

Version: Godot 3.2

*OS/device including version: Windows 10

Issue description: If your Kotlin class has a public lateinit var of Vector2, it’s “unassigned” value in the Godot editor is 0,0. Giving it any other value will cause it to be assigned in Kotlin, and everything is fine. However, the user may want 0,0 as their value, and in this case, accessing the var in Kotlin will result in an unassigned lateinit var exception being thrown.

Steps to reproduce: Run the coroutines sample project. MirrorBall.kt lateinit var center: Vector2

Minimal reproduction project: The coroutines sample project.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
chippmanncommented, Feb 23, 2020

If you are really curious https://github.com/utopia-rise/godot-kotlin/blob/feature/rework_entry_code_generation/REGISTRATION.md but note: i’m not yet finished. Expect some minor changes and wait for the full PR.

0reactions
Wavesonicscommented, Feb 24, 2020

Ha whops

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vector2(0, 0) is not equal to Vector2(0, 0) for some ...
You can be lucky when the values have been initialized from the same source/assignment and not changed since then. But it is still...
Read more >
Vector2 — Godot Engine (stable) documentation in English
Vector used for 2D math. 2-element structure that can be used to represent positions in 2D space or any other pair of numeric...
Read more >
Getting and setting individual x and y values in Vector2
I have the following code: var Location = Vector2(64, 64) if Location[0] > 911.0: Location[0] = ... I check what the x value...
Read more >
What does, "Invalid call. Nonexistent 'Vector2' constructor." ...
Nonexistent constructor means that you haven't passed the correct arguments to the constructor, "Vector2()". "Vector2()" can take different ...
Read more >
Why we often use Vector2.ZERO for moving an object
Hi, Vector2.ZERO is just a vector with zero length its the same as Vector2(0,0) It has no special importance for anything.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found