lua ファイルを動的にロードすることは可能ですか? たとえば、次のレベルをロードしますか?
背景: * ストーリーボード ベースの小さなゲームを用意する * レベルごとに異なるストーリーボード ファイルを作成する予定でしたが、ダイナミクス/コードはまったく同じなので、レベルの背景/オブジェクトを別のファイルから動的にロードすることにしました。たとえば、level_1.lua、level_2.lua などを使用できます。これらのファイル内で、(lua で) バックグラウンド/インタラクション オブジェクトなどのセット全体を作成し、メインのゲーム ストーリーボード ファイルに 1 つの表示オブジェクトとして戻すことができます * 機能しました「require level_1」で問題ありませんが、これを動的にしようとすると、問題が発生する可能性があります
それが不可能な場合、何か提案はありますか?