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
  Adding a CP breaks the mesh lethekun 3 6 05-25-2022, 01:53 AM
Last Post: _Aka_
  Any plan of adding a way to group nodes in the TrackGenerator? niuage 2 5 03-06-2022, 02:03 PM
Last Post: _Aka_
  Conform function, but applied to different directions at the same time Hartigan27 1 8 02-19-2022, 05:09 PM
Last Post: _Aka_
Question IndexOutOfRangeException in CurvySplineSegment.LocalFToDistance function mchangxe 13 3,235 05-06-2021, 12:56 PM
Last Post: _Aka_

Forum Jump: