Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object previousObj = alreadyCreatedObj;
- for (int i=0; i < objectCount; i++)
- {
- object newObj = createInstance(objectPrefab);
- newObj.linkToPrevious = previousObj;
- if(i < objectCount - 1)
- {
- previousObj = newObj;
- }
- else
- {
- endObj.linkToPrevious = newObj;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement