Scene Loading Script

This commit is contained in:
Savya Bikram Shah
2026-05-28 14:40:21 +05:45
parent e0e7601c27
commit dd6a7be1fc
31 changed files with 312 additions and 121 deletions

View File

@@ -1,5 +1,7 @@
using System.Threading;
using Cysharp.Threading.Tasks;
using Darkmatter.Core.Contracts.Services.Scenes;
using Darkmatter.Core.Enums.Services.Scenes;
using Darkmatter.Features.AppBoot.SceneRefs;
using UnityEngine;
using UnityEngine.Video;
@@ -10,10 +12,12 @@ namespace Darkmatter.Features.AppBoot.Flow
public class AppBootFlow : IAsyncStartable
{
private readonly AppBootSceneRefs _sceneRefs;
private readonly ISceneService _sceneService;
public AppBootFlow(AppBootSceneRefs sceneRefs)
public AppBootFlow(AppBootSceneRefs sceneRefs, ISceneService sceneService)
{
_sceneRefs = sceneRefs;
_sceneService = sceneService;
}
public async UniTask StartAsync(CancellationToken cancellation = default)
@@ -29,6 +33,7 @@ namespace Darkmatter.Features.AppBoot.Flow
player.loopPointReached += OnDone;
player.Play();
await _sceneService.LoadSceneAsync(GameScene.MainMenu, null, cancellation);
await tcs.Task.AttachExternalCancellation(cancellation);

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 585a9b1ea84a5404d8726cb7e20e6398
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
{
"name": "Features.Coloring",
"rootNamespace": "Darkmatter.Features.Coloring",
"references": [
"GUID:6a0a834eb41764f12ba55c3fb04a40cb",
"GUID:c1c03c0e5b2f4412b9f2be1c20d6a9b1",
"GUID:c176ee863a5e74e88a6517f9f102cf92",
"GUID:b4c9f7fbf1e144933a1797dc208ece5f",
"GUID:b0214a6008ed146ff8f122a6a9c2f6cc",
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:80ecb87cae9c44d19824e70ea7229748"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4cede189a43c349069c614e305683720
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e9ad07895989e445f8557096c4a1aa7a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
using Darkmatter.Libs.Installers;
using UnityEngine;
using VContainer;
namespace Darkmatter.Features.Coloring
{
public class ColoringFeatureModule : MonoBehaviour,IModule
{
public void Register(IContainerBuilder builder)
{
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d0dc926588daf4a139e807f48f664baf