https://linen.dev logo
Join Discord
Powered by
# ceramic
  • a

    ambitious-knife-25690

    03/23/2023, 5:58 PM
    if they're in multiple scenes load in app i guess
  • a

    ambitious-knife-25690

    03/23/2023, 5:59 PM
    no need to reload it in every scene
  • b

    billowy-waiter-28954

    03/23/2023, 6:18 PM
    @faint-toothbrush-51643 yes, and you can still make those assets accessible within the scene's
    assets
    object by setting
    assets.parent = app.assets;
    in your scenes
  • b

    billowy-waiter-28954

    03/23/2023, 6:18 PM
    -> https://ceramic-engine.com/guides/assets/#assets-inheritance
  • f

    faint-toothbrush-51643

    03/23/2023, 6:20 PM
    oh i've just been accessing app.assets directly
  • f

    faint-toothbrush-51643

    03/23/2023, 6:21 PM
    i know i can access app.assets, i was just asking if that's optimal for this case
  • a

    ambitious-knife-25690

    03/23/2023, 6:21 PM
    as a blanket "yeah" it seems so, unless you have any particular reason you don't want it preloaded early for each scene then go for it
  • a

    ambitious-knife-25690

    03/23/2023, 6:22 PM
    but this is one of those things that is context dependent
  • b

    billowy-waiter-28954

    03/23/2023, 6:25 PM
    Sure if you have some assets that you use on several scenes, better to have them loaded before. Using app.assets for that is valid
  • f

    faint-toothbrush-51643

    03/24/2023, 12:14 AM
    oookay i've finally implemented that and it isn't working
  • f

    faint-toothbrush-51643

    03/24/2023, 12:19 AM
    aaand i worked around it
  • f

    faint-toothbrush-51643

    03/24/2023, 12:21 AM
    it seems that at least in new Project(), if you try to load a non-standard asset type, it doesn't work
    Copy code
    hx
        app.assets.add(Spines.HUMAN);//error
        app.assets.addSpine("human");//works
  • f

    faint-toothbrush-51643

    03/24/2023, 12:28 AM
    nevermind, that actually apparently doesn't load it at all
  • f

    faint-toothbrush-51643

    03/24/2023, 12:36 AM
    when i do that, i get
    Copy code
    Load spine human C:\Haxe\ceramic\plugins\spine\runtime\src\ceramic\SpineAsset.hx:70
    Failed to retrieve json path for spine: human C:\Haxe\ceramic\plugins\spine\runtime\src\ceramic\SpineAsset.hx:94
    Failed to load asset human (SpineAsset(human human)) C:\Haxe\ceramic\runtime\src\ceramic\App.hx:865
  • f

    faint-toothbrush-51643

    03/24/2023, 1:09 AM
    okay i've actually made a functional workaround this time
  • b

    billowy-waiter-28954

    03/24/2023, 9:10 AM
    Difficult to say what’s going wrong without having the whole context anyway
  • b

    billowy-waiter-28954

    03/24/2023, 1:18 PM
    Soon™️
  • g

    gifted-whale-78169

    03/24/2023, 3:58 PM
  • g

    gifted-whale-78169

    03/24/2023, 3:58 PM
    comedy ™️
  • I'm going thru entities and components. One thing that i noticed, I find it weird you didn't provide a factory approach to the component systems, as they must be created only for 1 Entity. And the entity literally disposes the component instance (on your behalf) if you assign another one under the same name... as i migrate this to Flutter, it threw an exception right away on the "event", for obvious reasons 😛 when disposing the same component. I think i might go with an implementation based on "generics" or Types... on my end like: `entity.addComponent<Type>();`
    m

    miniature-lawyer-98519

    03/29/2023, 7:33 PM
    I'm going thru entities and components. One thing that i noticed, I find it weird you didn't provide a factory approach to the component systems, as they must be created only for 1 Entity. And the entity literally disposes the component instance (on your behalf) if you assign another one under the same name... as i migrate this to Flutter, it threw an exception right away on the "event", for obvious reasons 😛 when disposing the same component. I think i might go with an implementation based on "generics" or Types... on my end like:
    entity.addComponent<Type>();
  • Idk how to call it
    m

    miniature-lawyer-98519

    03/29/2023, 9:04 PM
    Idk how to call it
  • Resolve instance initialization at runtime? Like component metadata does?
    m

    miniature-lawyer-98519

    03/29/2023, 9:04 PM
    Resolve instance initialization at runtime? Like component metadata does?
  • Did you read this: https://ceramic-engine.com/guides/components/?
    b

    billowy-waiter-28954

    03/29/2023, 9:05 PM
    Did you read this: https://ceramic-engine.com/guides/components/?
  • Yep
    m

    miniature-lawyer-98519

    03/29/2023, 9:05 PM
    Yep
  • I know both systems are there
    m

    miniature-lawyer-98519

    03/29/2023, 9:06 PM
    I know both systems are there
  • var entity = new MyEntity() var component = MyComponent() entity.component( ‘a’, component ) entity.component( ‘a’, component )
    m

    miniature-lawyer-98519

    03/29/2023, 9:08 PM
    var entity = new MyEntity() var component = MyComponent() entity.component( ‘a’, component ) entity.component( ‘a’, component )
  • component disposed
    m

    miniature-lawyer-98519

    03/29/2023, 9:08 PM
    component disposed
  • Why would i instantiate a component by itself when only is meant exists inside an entity?
    m

    miniature-lawyer-98519

    03/29/2023, 9:09 PM
    Why would i instantiate a component by itself when only is meant exists inside an entity?
  • Thats was my point
    m

    miniature-lawyer-98519

    03/29/2023, 9:09 PM
    Thats was my point
  • `Component` is only an interface
    b

    billowy-waiter-28954

    03/29/2023, 9:09 PM
    Component
    is only an interface
1...101102103...124Latest