Search Unity

How to optimize swapping game objects??

Discussion in 'Scripting' started by dullman, May 3, 2016.

  1. dullman

    dullman

    Joined:
    Jan 20, 2015
    Posts:
    29
    Hello i have a problem, in game i implement a simulation of blend shapes for 2d graphics(or morphs), but i work on svg data and every change i reload object which takes some time, in other words it's drop frame rate drastically if i continuously morph object or one time if i single time change. As this object is part of character group object so it showing in animation that we make something like that. I made a loading object in coroutine but it doesn't shows any result, so i suspect the deleting old object and adding new one also adds some drop in FPS.
    I'm thinking if the method known for graphics will work means create copy modify it and swap it with original will work, but in the beginning it's showed that instantiate object doesn't work like in documentation since deleting one of child objects also removed reference to graphic data in original leaving only empty object.