Skip to content

Conversation

@GeoB99
Copy link
Owner

@GeoB99 GeoB99 commented Sep 17, 2025

As the title says.

Demonstration

2025-09-16_23-39-57.mp4

TODO

  • Implement script code for the management of this UI
  • [ ] Make the UI fit the COTL-style a little bit (it'll be postponed at a later time)

@GeoB99 GeoB99 added this to the Beta Release milestone Sep 17, 2025
@GeoB99 GeoB99 requested a review from necoarcc September 17, 2025 08:53
@GeoB99 GeoB99 self-assigned this Sep 17, 2025
@GeoB99 GeoB99 added the UI For the UI/UX aspect of the mod label Sep 17, 2025
@GeoB99 GeoB99 linked an issue Sep 17, 2025 that may be closed by this pull request
3 tasks
@GeoB99 GeoB99 force-pushed the UI/ServerList branch 2 times, most recently from 9986977 to 37958b5 Compare September 23, 2025 21:12
@GeoB99 GeoB99 force-pushed the UI/ServerList branch 3 times, most recently from e711757 to 156e7a6 Compare January 23, 2026 23:13
string AbsolutePath;

/* Sanity check -- Make sure the Assets folder of the mod exists */
SceneBundleLocation = GetUiScenePathLocation(Scene);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unnecessary: all scenes can be packed into the same assetbundle and then identified by the scene name alone

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So a single UI asset bundle? Alright, gotcha

* This parameter is optional and ignored for every other scene name.
*
*/
public static void ShowScene(string SceneName, Action ActionToTakeCallback)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the point of this method, it calls a different method for one scene and just uses SceneManager.LoadScene for the rest. Wouldn't having a dedicated method just for the main menu and calling LoadScene in all other cases be better?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having an extra method just to switch back to the main menu scene feels too redundant so the point of ShowScene is to exactly encapsulate two ways of loading scenes.

public static void DisplayUi()
{
/* Load the server list UI scene, the asset bundle should be already loaded */
COTLMP.Api.Scenes.ShowScene("ServerListUI", null);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SceneManager.LoadScene can be used directly here instead

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of COTLMP.Api.Scenes is to have a API wrapper of Scenes methods for the mod so that we may wanna implement whatever code we wanna implement, whatever that makes sense to you

* be loaded in memory after the scene has been loaded.
*/
COTLMP.Debug.PrintLogger.PrintVerbose(DebugLevel.MESSAGE_LEVEL, DebugComponent.UI_COMPONENT, "BindUiElements() called");
yield return new WaitForSeconds(0.5f);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read about it and SceneManager.LoadScene loads the scene completely next frame. Instead of waiting 500ms, you can use yield return null; to make it run the next frame.

{
AssetBundle Bundle;

Bundle = COTLMP.Api.Scenes.LoadSceneBundle(SCENE_TYPE.SceneServerList);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can have a single call to load an assetbundle containing all scenes here instead

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't include: build artifact

Copy link
Collaborator

@necoarcc necoarcc Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add AssetBundles folder, TextMesh Pro "Examples & Extras" (if not depending on it) and Documentation, and Temp folders here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not gonna through the entire Examples folder, but if nothing here is in use, remove it from git

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'll remove the Examples folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI For the UI/UX aspect of the mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement basic UI support

3 participants