Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これが単純すぎるように聞こえる場合は申し訳ありませんが、解決策を見つけることができませんでした。ゲームで複数のレイヤーを使用しています。レイヤーがシーンに追加されているかどうかを確認するにはどうすればよいですか?
[MenuManager sharedMenuManager] が問題のレイヤーであると仮定して、これを試してください。
if (![MenuManager sharedMenuManager].parent) { // has not been added before }