Jump to content

» «

[C#] Spawning Props without Wait / Threadsleep

No replies to this topic
  • CliffHanger

    Default Avatars are Han Solos

  • Members
  • Joined: 14 Jan 2016
  • Canada


Posted 11 September 2017 - 04:06 AM Edited by CliffHanger, 11 September 2017 - 04:09 AM.

My UI / Scripts will always flicker due to micro pauses in the script (single thread). I tested various cases and it's definitively related to World.CreateObject.


From what I understand it's not possible to spawn an object without prop.request / while (prop.isloaded). It appears the World.CreateObject function was also updated with these functions.

It work fine but the UI flickering is absolutely bad considering I'm creating several objects at various intervals so it's a persistent problem.


Anyone knows of a way to spawn props without pausing? I tried to put them in memory by requesting them when the scripts initializes but it appears that they unload the moment I set a prop as MarkAsNoLongerNeeded() (makes sense considering the model is attached, and I'm doing this persistently for cleanup purposes).


Should I have to resort to using another thread?

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users