Пример #1
0
        /// <summary>
        /// Converts a normal light to an insert light, by deleting and re-creating the insert prefab.
        /// </summary>
        /// <param name="lo">Light component to convert</param>
        /// <returns>New converted game object</returns>
        protected GameObject ConvertToInsertLight(LightComponent lo)
        {
            var name   = lo.name;
            var parent = lo.transform.parent.gameObject;

            Object.DestroyImmediate(lo.gameObject);
            return(CreateInsertLight(TableContainer.Get <VisualPinball.Engine.VPT.Light.Light>(name).Data, parent));
        }