Clone on import

@normen: How is it inconsistent? There are two cache types for non-smart assets (i.e. non-cloneable assets), there’s the SimpleAssetCache which requires the user to manually remove entries from the cache, and then there’s the WeakRefAssetCache which removes the asset when it is no longer referenced in user code.

@Momoko_Fan: As OP mentioned here: http://hub.jmonkeyengine.org/forum/topic/clone-on-import/#post-202736 some of the objects he got were references. I would have thought a plain Savable (no other things implemented) would always generate new instances? Or is that not the case? Or did the OP implement something else where the cache set in in an “uncontrolled” manner?

The default behavior for AssetKey is to use SimpleAssetCache and no cloning. This is why his savables were not cloned (used AssetKey) but the models were cloned (used ModelKey).

1 Like
@Momoko_Fan said: The default behavior for AssetKey is to use SimpleAssetCache and no cloning. This is why his savables were not cloned (used AssetKey) but the models were cloned (used ModelKey).
Alright, thats the new caches etc. Now I know that too, thanks ;)