コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

「DontDestroyOnLoad only work for root GameObjects or components on root GameObjects.」

概要

子オブジェクトに対して DontDestroyOnLoad 関数を使用すると表示される警告
DontDestroyOnLoad 関数はルートのオブジェクトにのみ使用可能