Skip to content

dertom95/UrhoLDT

 
 

Repository files navigation

UrhoLDT

This project provides autocomplete for Urho3D API in Eclipse LDT. To install this environment follow the instructions at Eclipse LDT reference

In order to have code-completion on code like this:

    local light = lightNode:CreateComponent("Light") 

LDT needs to know what type light is. For this you can use a comment to map this variable to a specific type( -- Class#Class ). :

    local light = lightNode:CreateComponent("Light") -- Light#Light

Now you have code-completion working even for this cases.

HTML-Documentation
Right-Click on Urho-Environment->Open documentation:
show documentation

Debugging

For the debugger to work:

  • luasocket available in library path

    • something like that( run>debug configurations) should work:
      config
      You can also use environment variables. Maybe those are already in your path.
      In my ubuntu the cpath/path was only point to /usr/local/...
  • You need to apply the git-patch in Urho3DPlayer-Patch-Folder. This will switch positions of options- and scriptname-arguments. (Warning you might need to change shellscripts that use the player e.g. the editor. Maybe you want to create an special Urho3D-Player just for debugging!?)

  • URHO3D_SAFE_LUA deactivated (as default,... actually I only guess that this option is to prevent shared library loading)

  • INFO As stated in the urho3d-documentation debugging might only work for single-script applications

How it works?

Urho3D uses toLua++ to wire up the engine with the Lua environment by parsing the Urho's C++ code. This project uses the same method to auto-generate a description of the Lua API in a way readable by Eclipse. This means that if you are using a development version and the provided package doesn't work for you, you can generate a new environment from your own Urho3D working copy by using one of the two provided build scripts (GenerateAPI.sh / GenerateAPI.bat).

Rebuild API

Linux:
./GenerateAPI.sh [Folder to Urho3D-SOURCE] [Path to Urho3D-Binary with built tools]

  • e.g. ./GenerateAPI.sh /home/userA/_dev/Urho3D /home/userA/_dev/_build/urho3d

Windows:
not fixed, yet. Pull-Requests welcome 👍

Just for info

I actually don't use this actively but thought it would be nice to share and I'm willing to accept pull-requests.

About

Autocomplete for Urho3D API in Eclipse LDT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 99.7%
  • Other 0.3%