Giter Site home page Giter Site logo

For scripts, Godot treats paths as case-insensitive in attach script window, but case-sensitive when running the project. about godot HOT 4 OPEN

mightyherc avatar mightyherc commented on June 19, 2024 1
For scripts, Godot treats paths as case-insensitive in attach script window, but case-sensitive when running the project.

from godot.

Comments (4)

dalexeev avatar dalexeev commented on June 19, 2024 1

See Project organization - Case sensitivity.

from godot.

Calinou avatar Calinou commented on June 19, 2024

. Attach new scripts in popup using the path "/scripts" (note use lowercase 's')

How did you achieve this? Did you manually enter the path in the text field?

from godot.

mightyherc avatar mightyherc commented on June 19, 2024

Yes, I manually typed it in. I was double clicking the default folder (e.g. Scenes) then typing "scripts". Being lazy, I was not capitalizing the 's' since it worked.

from godot.

mightyherc avatar mightyherc commented on June 19, 2024

@dalexeev, thanks. Sorry, I missed the message. The section specifies that issues may occur when exporting projects. I am still learning Godot so maybe I am missing something.
However, setting the case-sensitivity in Windows (as per your link) avoids the problem from happening (i.e. Godot does not recognize "scripts" and "Scripts" as the same path).

I still feel this is odd behaviour. I was trying to find a suggestion, but I have no C++ experience and no experience with Godot source code. I reviewed some parts of the source code.
My thinking was to have the ScriptCreateDialog::_path_changed set the path equal to whatever the path actually is (e.g. check if the path exists, then read back the path from the OS). So, if a user enters ".../scripts/..." and the folder is ".../Scripts/..." (and, Unix, "scripts" does not exist), the text field would display ".../Scripts/...". The main thing I am not sure about is how can you say "what is the path for this path"...Seems like a weird thing to do and not sure if it is supported. Some googling suggests it is, but as mentioned, I have no real experience.

I noticed there are different classes for Windows and Linux for the directory access, so maybe there could be a function in there to return the path? Unix would just return whatever path was passed in. Function could be called when directory exists.

from godot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.