Forum rules - please read before posting.

Possible optimisation

I have seen a lot of Camera.main in the code, each time this is called it does a findObjectOfTag underneath which is kind of slow. I am wondering whether you should cache the first call to Camera.main, to get an increase in speed ? Worth trying maybe? I learned this from here, excellent video!


  • Good tip, but the danger here is that it would cause problems when used in conjunction with other assets that take control over the main camera.
  • what about a simple tick box, "kill when offscreen?" ie no time at all is spent on AC which is offscreen. Or "ticks when offscreen" like they do their work every X many ticks, so they respond but very slowly when offscreen to save cpu. I already have this hacked into AC for the last few years but it just came to me I should suggest to you because you said optimisations are welcome.
  • To kill what, exactly?  This doesn't seem related to the original post in this thread.

    If you're hacking this in yourself, by all means share more details to me in a PM.
  • sorry mate it was wrong thread, i meant kill the ac npcs, since they take a lot of cpu time even when not visible if theyre following a path
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.