Comments (5)
For example, here is the image loading I used for Marshmallow :
Used like this
image = ImageUtilities.LoadImage(Main.helper.Manifest.ModFolderPath + "clouds_cap.png");
from owml.
- Meshes : Can still use ObjImporter
- Textures : Can be simplified (see above)
- Audio : Unity has no built in methods for audio loading, so WWW has to be used (or something better?)
from owml.
Basically I want to try removing the OnLoaded
stuff that you have to do, and make it just return the wanted asset. However, maybe co-routines are the best option, as they won't hang the program while loading... then again, loading images and meshes should only take a short amount of time (and mods shouldn't really be loading in massive mesh files - that's what asset bundles are for!)
from owml.
from owml.
Good comments 👍
Some thoughts:
- It's important that loading assets happen in separate threads, as otherwise the game would freeze. Coroutines are one way of doing that.
- Why return textures as part of a gameobject instead of directly? I think I did it that way so the texture would survive when changing scenes - notice the gameobject runs DontDestroyOnLoad().
I agree asset loading deserves an overhaul. We could create an entirely new asset loading project (start from scratch) and deprecate the old one. That'd give us a lot of freedom to re-think it.
from owml.
Related Issues (20)
- "Leave menu" in mod config menu goes back to the main menu, instead of the MODS tab as expected
- Some buttons in mod menus don't make any noise
- Allow a mod settings option to only show up if you have DLC
- [Request] Steam Deck compatibility HOT 5
- [Request] Add explanation for settings in config menu like in base game menus HOT 2
- Issue with enabling mods using manager - game starts in "vanilla mode" HOT 1
- Disabled mod with cyclic dependency breaks load order HOT 1
- Add a way to disable the wrong game version popup
- Version mismatch "not loading" error appears for disabled mods HOT 3
- Attempt to read non existent files from Xbox version HOT 3
- Add popup and options menu Text components to language controller.
- Game freezes for a second when you click on a mod in the config menu, causing this error to show up repeatedly
- silder can't show value in mod setting
- Flatpak: 'Mods folder not found' warning HOT 1
- Add translation support for config options HOT 3
- Add Support For Per-Profile Config Options HOT 1
- Overhaul The Custom Config File Format
- Document new menu system
- Add "Requires DLC" Flag to the Manifest and Enforce It
- Clicking on MOD OPTIONS tab hides menu elements
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owml.