Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding function to set GameObjecs in InputGameObject.cs
#1
Hello 

I want to add InputGameObject module to generator through code. and then i want to add list of game objects to it. every thing fine until i tried to add the list of game objects to the module . the property for game objects is get only and i cant set a list to it. 
So I added function to add the game objects to the module and i added it in InputGameObject.cs script as follow

Code:
  public void InitGameObjectList(List<CGGameObjectProperties> lstObjects)
        {
            m_GameObjects = lstObjects;
        }


every thing is now working perfect i can add list of objects to it , But i want to make sure that if this function will have problems if i call it at runtime or it will cause issues to the generator at later point?
Reply
#2
Hi
I don't advise you to do that. Do this instead:
GameObjects.Clear();
GameObjects.AddRange(yourList);
If you have any issue with this let me know.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Super , Thanks allot for the advice  Big Grin
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question IndexOutOfRangeException in CurvySplineSegment.LocalFToDistance function mchangxe 11 459 03-22-2021, 07:07 PM
Last Post: _Aka_
  Merge function for two CurvySplines HatraE 4 369 01-29-2021, 12:51 PM
Last Post: HatraE
  Adding OnSwitch event via Script NovoNG 3 339 01-09-2021, 05:25 PM
Last Post: _Aka_
  Change default settings when adding a point UsernameHed 3 2,291 07-31-2019, 11:03 AM
Last Post: _Aka_

Forum Jump: