Comments (5)
I'll add this information to the book.
from fyrox.
Same question regarding renderer?
fn set_quality_settings(renderer: &mut Renderer) {
let mut settings = QualitySettings::high();
// Disable something.
settings.use_ssao = false;
settings.fxaa = false;
// Apply.
Log::verify(renderer.set_quality_settings(&settings))
}
from fyrox.
I've found zero examples which use any kind of builder, but UI. Frustrating :(
from fyrox.
Hi! You need to borrow a scene from the container: let scene = &mut context.scenes[self.scene]
. It can be done in pretty much any methods of your plugin. Keep in mind, that game template uses async scene loader and self.scene
will be set to a correct value on after the scene is fully loaded. So ideally, you should do a checked borrow if let Some(scene) = context.scenes.try_get_mut(self.scene) { ... }
. Also, if you need to catch the moment when you scene is fully loaded, then you could place your code in the place where the scene is fetched from the async loader (here for example - https://github.com/FyroxEngine/Fyrox-demo-projects/blob/main/sound/game/src/lib.rs#L137).
About the renderer: you can access it from graphics context. For example: if let GraphicsContext::Initialized(ref mut graphics_context) = plugin.graphics_context { ... }
. Notice the GraphicsContext::Initialized
- since creation of the graphics context is delayed to Event::Resumed
, at the start of your app, there's no GraphicsContext
, it will be created shortly after. If you need to catch the moment when it is fully initialized, use Plugin::on_graphics_context_initialized
method.
These quirks are here, because the engine supports WebAssembly and Android. Both of these platforms enforces their limitations and we have to live with them.
from fyrox.
Added:
- Fetching scenes - https://fyrox-book.github.io/fyrox/scene/scene.html#where-all-my-scenes-located
- Fetching renderer - https://fyrox-book.github.io/fyrox/rendering/settings.html#how-to-apply
I'm closing the issue.
from fyrox.
Related Issues (20)
- Not working with wayland HOT 2
- The "Run" Button Does Not Work on the Editor
- Is it possible to run VR on all devices with Rust? Are we heading towards the era of wearable VR PCs? HOT 2
- Can't start "Quick Start" from Fyrox Game Engine Book, I get error: stream did not contain valid UTF-8 HOT 3
- Black Screen HOT 4
- Move interaction modes panel to the toolbar
- Add icons for widgets in World Viewer
- Add an ability to rotate the editor camera using scene gizmo HOT 2
- Calculate frame luminance using histogram for HDR HOT 3
- Add an `ImageDecorator` widget
- Add an ability to unassign textures in material editor
- Add ability to perform convex shape casting in physics
- Support for shader editor
- More hotkeys
- Editor crash when saving terrain HOT 1
- Mixamo mesh import issue HOT 2
- Fyrox-Sound glitchy sounds on Android HOT 2
- Bug found - Clicking in asset browser deleted some files and duplicated the data folder 180+ times until I Ctrl+C the editor process. HOT 2
- thread 'main' panicked HOT 25
- No Texture field in the Inspector HOT 7
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 fyrox.