Setup in Biomes/Paths
Errant Biomes
- For Blueprint-only projects
- For code projects
For Blueprint-only projects, change the HISM class spawned by the Species to one of the HISM BPs provided in the EII plugin content folder (/Content/Example/Biomes/Blueprints):
- BP_OfflineInteractableBiomesHISMComponent - for offline-spawned Species,
- BP_RuntimeInteractableBiomesHISMComponent - for runtime-spawned Species.
Those BPs derive from UBiomesHierarchicalInstancedStaticMeshComponent
, which is recommended for use in Errant Biomes. They also correctly register/unregister to EII in the context of World Partition and Errant Biomes Runtime Spawning.
For code projects, copy UEiiHierarchicalInstancedStaticMeshComponent
class from EII to your game project and modify it to derive from UBiomesHierarchicalInstancedStaticMeshComponent
. Then create a BP class in the Editor that derives from your new class and configure its EII-related properties ("DefaultActorClassToConvertTo" and "MeshToActorClassMapping").
Once this is done, we recommend testing this class first by manually adding it to the level and adding a few mesh instances by hand. If you can interact with the instances, the new class is working properly.
Unfortunately, we can't provide this class as part of the EII plugin, because the plugin is not dependant on the Errant Biomes plugin and can't reference Errant Biomes classes.
Next, configure the Species in Errant Biomes to use your newly created HISM class instead of the default one.
Finally, set the DefaultActorClassToConvertTo and MeshToActorClassMapping properties of the HISM class, as described in the General Setup. You can set those params in the HISM BP class or in the Species (as shown in the screenshot above, below the highlight).
Starting with Errant Biomes 1.9, interaction can be configured for offline and runtime spawned Species. Prior to Errant Biomes 1.9, interaction can be configured only for offline spawned Species.
Code projects can use a single HISM class that works for both offline and runtime spawned Species. BP-only projects need to use two different HISM BP classes for offline and runtime Species.
Errant Paths
- Errant Paths 1.0 and prior
- Errant Paths 1.1 and later
Start by creating a new class based on ASpawnedSubActor
and implement registration to EII in its BeginPlay
.
Next, open the PathDescription asset of your Path and modify the "SubActor Class" in the "Partition" settings. Select your new SubActor class.
Finally, regenerate the Path with the "Physics" toggle enabled (as collision is often used to detect interactions).
Create a BP class that derives from UEiiInstancedStaticMeshComponent
and configure its EII-related properties ("DefaultActorClassToConvertTo" and "MeshToActorClassMapping"). Then create another class from UEiiHierarchicalInstancedStaticMeshComponent
and configure its EII-related properties.
Next, open a PathTemplate asset, select one of the static meshes (UEpPathTemplateStaticMeshComponent
)
and find its "Instancing" settings and change:
UInstancedStaticMeshComponent
to your new BP ISM class.UHierarchicalInstancedStaticMeshComponent
to your new BP HISM class.
Compile the PathTemplate and regenarate the Path.
Finally, regenerate the Path with the "Physics" toggle enabled (as collision is often used to detect interactions).
Troubleshooting
In case the interaction isn't working, here are some troubleshooting ideas:
- Is the mesh you want to interact with an instance of a ISM?
- Is the ISM registered to EII? Add a breakpoint in the Event Graph or in the code and check. Alternatively, use the
errant.instanceinteraction.DrawDebugs 1
cmd in the Editor and check if the instances seem to be managed by EII (there should be a label rendered above each registered ISM). - Does the gameplay logic properly detects the instance and triggers conversion to actor?
- Does the instance has simple collision? Does the mesh asset has simple collision configured?
- Are there any warnings in the Output Log?