Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creting SplineControllers thru code generating errors
#6
(06-01-2020, 11:29 AM)_Aka_ Wrote: What do you mean by unexpected results?
To clarify:
Code:
someEvent?.Invoke(someEventArguments)
is a shorter way to write

Code:
if(someEvent!= null)

someEvent.Invoke(someEventArguments)
So what will happen is that all events will be ignored in the first frame of existence of the controller, while the event is null, but will be available again starting from the second frame. Is this matching the unexpected result you mentionned, or is it something else?

Correct. Above resolves InvokeEventHandler related errors. But I'm still getting errors at Initialize.. should I add ? to it as well? 

From this: onInitialized.Invoke(this);

to this: onInitialized?.Invoke(this);
Reply


Messages In This Thread
RE: Creting SplineControllers thru code generating errors - by curvyuser007 - 06-07-2020, 04:07 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Generating GO only on CPs in Generator GameDeveloperek4123 1 7 03-04-2024, 11:06 AM
Last Post: _Aka_
  Missing Loader errors after build FanManPro 8 9 01-20-2023, 11:45 AM
Last Post: _Aka_
  Permission to publish custom CGModule source code? Apelsin 6 9,422 09-15-2022, 08:53 PM
Last Post: Josaf Tom
  Import/Export, Spline from code Mos Def 4 783 02-14-2022, 11:42 AM
Last Post: _Aka_

Forum Jump: