Jump to content

Recommended Posts

Posted

Is this the expected behavior? I got the C++ DLC on Steam and created a new project using C++. I added the awesome water prefab to the map using and the game crashed when I tried to run it. It crashed because App is nil in Script:Start().

Posted

Basically the water prefab seems like it will only work with a Lua project at this time because it must be using the App logic somewhere. This is actually an interesting thing which I haven't thought of. I always advocated to just use App.context/window/camera in entity scripts but I see now why that is wrong. I didn't make this water prefab but the person who did probably thought the same thing when they made it. Since Leadwerks for Lua was the first one out everything was working fine, but now that C++ is out these will be broken.

 

Find in Script:Start() of the prefab what variable it's trying to access of App (App.?). There are other functions you can use that won't rely on App to get things like World::GetCurrent(), Context:GetCurrent(), etc. If it's the camera that it's trying to get from App then you'll have to do that another way.

Posted

The waterprefab is kind of outdated and hard to use I will remove it.

I was suppose to make a new one, but was kind of hoping klepto to put his in the workshop instead.

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Posted

If it's in the Workshop I would not remove it. It's okay to rename it like "Water Prefab [Legacy]" or something like that.

My job is to make tools you love, with the features you want, and performance you can't live without.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...