Skip to content

Common issues troubleshooting

PixelRain edited this page Dec 3, 2024 · 11 revisions

Header files can't be reached or includes red underline:

Symptoms may include intellisense failing to detect classes and/or plainly unreachable classes (noticed in errors when building).

This issue may occur while creating a custom templated project or just moving/messing around with the original godot-roguelite repo.

Solution 1:

Project > Delete Cache and Reconfigure

Solution 2:

Building may not fail even if your intellisense does, and it may actually fix your intellisense issue (if that's your only issue). Build > Build gdextension

Solution 3:

Close and open Visual Studio. (yeah sometimes it takes just that)

Solution 4:

  1. Close the project in vs.
  2. Delete .out folder
  3. In vs let cmake run when the vs project opens or hit delete cache and reconfigure.
  4. Make sure the .out folder regenerates. If it doesn't after 30s, edit CMakeLists.txt (eg: add a space, remove and save). That should get the .out file back.
  5. Run a gdextension build.
  6. After the build finishes, wait a while and see if intellisense recovers.

Solution 5:

Project > Rescan Solution

Solution 6:

Change the debugger back and forth and let VS rest for a while each change.

image

Cannot read .dll error

Your godot editor version is likely not the same as the one you made the .dll build for.

Proposed CMake Script Changes + Editor lag when adding classes through Visual Studio Community

With the CMake addon installed, you may have the Tools > Options > CMake, “Enable automatic CMake script modification toggle on (it's on by default). This can cause editor lag when adding new classes through the VS Community editor, and also proposes changes to the cmake files (which you most likely won't want).

Toggle the automatic CMake script modification off to avoid issues with this.

image

Problem with submodules.

If you messed up, or think the submodules for your rogelite/roguelite templated project are messed up, you can follow these steps to reset them properly:

  1. Remove contents of extern/ folder.

  2. Remove .gitmodules file contents.

  3. Remove preexisting submodules, let's start by doing this to reconfigure them from scratch.

    From any folder in your repo run: git rm --cached extern/vcpkg -r

    and: git rm --cached extern/godot-engine -r

    and: git rm --cached extern/godot-cpp -r

  4. Open .git\config file and remove submodule entries there.

  5. Remove contents of .git\modules\extern

  6. Make sure you have the vcpkg submodule set up, to do this:

    If you've created a template and pulled it, or downloaded the project .zip file the roguelite submodules may have been preserved.

    You can confirm any existing submodules using git submodule status. If no submodules are setup, run the command in this step and step 4:

    From any folder in your repo run: git submodule add https://github.com/microsoft/vcpkg extern/vcpkg

  7. Make sure you have the godot-cpp and godot submodules set up, to do this:

    From any folder in your repo run: git submodule add -b 4.3 https://github.com/godotengine/godot-cpp extern/godot-cpp

    and: git submodule add -b 4.3 https://github.com/godotengine/godot extern/godot-engine

    Note: version 4.3 is just an example, make sure you use Godot version your project requires.

  8. Make sure your .gitmodules file only has the 3 entries for your 3 previously added submodules (for ease you can just assert the contents of the file are the same as here)