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 }