Skip to content

Conversation

aggyomfg
Copy link

Hello, thanks for your creation! BMS is very useful engine!

This PR Potentially close #479

New Asset Reference Type: Added ReflectBase::Asset(UntypedHandle, ComponentId)
Asset Creation Functions: Added ReflectReference::new_asset_ref() and ReflectBaseType::new_asset_base()

Added two new world functions:
get_asset(handle_reference, registration) - Retrieves an asset by handle
has_asset(handle_reference) - Checks if an asset exists

Tests, Docs + but didnt get what else needed, please ask.

Copy link

semanticdiff-com bot commented Sep 29, 2025

Copy link
Contributor

github-actions bot commented Oct 1, 2025

🐰 Bencher Report

Branchasset_operations
Testbedlinux-gha

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
component/access Lua📈 view plot
⚠️ NO THRESHOLD
3,516.80 ns
component/access Rhai📈 view plot
⚠️ NO THRESHOLD
5,537.90 ns
component/get Lua📈 view plot
⚠️ NO THRESHOLD
2,122.10 ns
component/get Rhai📈 view plot
⚠️ NO THRESHOLD
4,233.40 ns
conversions/Mut::from📈 view plot
⚠️ NO THRESHOLD
89.18 ns
conversions/Ref::from📈 view plot
⚠️ NO THRESHOLD
84.83 ns
conversions/ScriptValue::List📈 view plot
⚠️ NO THRESHOLD
360.85 ns
conversions/ScriptValue::Map📈 view plot
⚠️ NO THRESHOLD
992.36 ns
conversions/ScriptValue::Reference::from_into📈 view plot
⚠️ NO THRESHOLD
28.79 ns
conversions/Val::from_into📈 view plot
⚠️ NO THRESHOLD
267.19 ns
function/call 4 args Lua📈 view plot
⚠️ NO THRESHOLD
1,636.20 ns
function/call 4 args Rhai📈 view plot
⚠️ NO THRESHOLD
1,325.20 ns
function/call Lua📈 view plot
⚠️ NO THRESHOLD
219.69 ns
function/call Rhai📈 view plot
⚠️ NO THRESHOLD
420.61 ns
loading/empty Lua📈 view plot
⚠️ NO THRESHOLD
862.87 ns
loading/empty Rhai📈 view plot
⚠️ NO THRESHOLD
856.14 ns
math/vec mat ops Lua📈 view plot
⚠️ NO THRESHOLD
6,942.80 ns
math/vec mat ops Rhai📈 view plot
⚠️ NO THRESHOLD
6,203.10 ns
query/10 entities Lua📈 view plot
⚠️ NO THRESHOLD
18,757.00 ns
query/10 entities Rhai📈 view plot
⚠️ NO THRESHOLD
19,001.00 ns
query/100 entities Lua📈 view plot
⚠️ NO THRESHOLD
38,303.00 ns
query/100 entities Rhai📈 view plot
⚠️ NO THRESHOLD
31,055.00 ns
query/1000 entities Lua📈 view plot
⚠️ NO THRESHOLD
240,040.00 ns
query/1000 entities Rhai📈 view plot
⚠️ NO THRESHOLD
158,400.00 ns
reflection/10 Lua📈 view plot
⚠️ NO THRESHOLD
5,741.40 ns
reflection/10 Rhai📈 view plot
⚠️ NO THRESHOLD
15,362.00 ns
reflection/100 Lua📈 view plot
⚠️ NO THRESHOLD
48,861.00 ns
reflection/100 Rhai📈 view plot
⚠️ NO THRESHOLD
718,500.00 ns
resource/access Lua📈 view plot
⚠️ NO THRESHOLD
3,307.30 ns
resource/access Rhai📈 view plot
⚠️ NO THRESHOLD
5,011.60 ns
resource/get Lua📈 view plot
⚠️ NO THRESHOLD
2,055.00 ns
resource/get Rhai📈 view plot
⚠️ NO THRESHOLD
3,752.80 ns
🐰 View full continuous benchmarking report in Bencher

@makspll makspll changed the title feat: Asset operations - working with bevy Assets<T> resource. feat: Asset references, world.get_asset and world.has_asset bindings Oct 4, 2025
@makspll makspll enabled auto-merge (squash) October 4, 2025 11:19
@makspll
Copy link
Owner

makspll commented Oct 4, 2025

Nice work, much appreciated! @aggyomfg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessing Assets<StandardMaterial> in scripts
2 participants