ramokz / phantom-camera

👻🎥 Control the movement and dynamically tween 2D & 3D cameras. Built for Godot 4. Inspired by Cinemachine.
https://phantom-camera.dev/
MIT License
1.93k stars 62 forks source link

Parser Error: Class "PhantomCamera2D" hides a global script class. #272

Closed luiscesjr closed 2 months ago

luiscesjr commented 2 months ago

Issue description

I just came back to my office from the weekend, and I got the update notice as soon as I opened Godot. After updating, I intended to do some playtesting but I was greeted with this error "Parser Error: Class "PhantomCamera2D" hides a global script class." As also shown in the image below.

image

I simply updated the add on from the auto updater, maybe I missed something?

Tried deleting .godot folder, delisting and relisting my project, reimporting all, but no dice.

And also tried to manually download the plugin again, also no luck there.

As a bonus I also get these warnings now:

image

Steps to reproduce

Update your add-on.

(Optional) Minimal reproduction project

No response

LenanYamao commented 2 months ago

I had the same issue, i had to delete phantom_camera_2d from my scene and add it back. If you look at your phantom camera it will probably look like this

image

You can also remove the script from your node and add it back, but you still have to reconfigure your camera

luiscesjr commented 2 months ago

I had the same issue, i had to delete phantom_camera_2d from my scene and add it back. If you look at your phantom camera it will probably look like this

I can confirm that "This is the way". Worked for me, thanks!

ramokz commented 2 months ago

The same issue was reported yesterday in #263.

Tldr; Godot is weird with class name changes. The issue was solved for the poster by reopening the Godot project several times.

It's a seemingly random occurring bug.

luiscesjr commented 2 months ago

The same issue was reported yesterday in #263.

Tldr; Godot is weird with class name changes. The issue was solved for the poster by reopening the Godot project several times.

It's a seemingly random occurring bug.

I'm sorry for double posting the issue, I looked through the recent open bugs and forgot to check the closed ones. And yes, it's quite random, occurred to my own created libraries not long ago.

ramokz commented 2 months ago

No problem! I do sometimes find it difficult to locate issues on GitHub as well, particularly when the search defaults to not show closed issues…

Closing this as it sounds like it's resolved now.