Skip to content

2 ‐ Importing demo assets

Kaden edited this page Dec 6, 2024 · 12 revisions

BIMOS contains sample assets and the sample scene from the demo that may be useful for level creation and programming:

  • Axe
  • BallCrate
  • BlockTower
  • Door
  • Elevator
  • GrappleGun
  • Hammer
  • Hook
  • Key
  • Ladder
  • LargeSled
  • PedestalButton
  • Pistol
  • Ragdoll
  • Table
  • Target
  • Thruster
  • ThrusterReversed
  • Tower

Importing demo assets

By release package

  1. Select the latest Release under Releases on the GitHub repository.

image

  1. Select and download DemoAssets.unitypackage

image

  1. Drag Demo.unitypackage into the Project window

The assets used in the demo will now be available in Assets/Samples/BIMOS/1.x.x/Demo Assets

By Git URL

image

The assets used in the demo will now be available in Assets/Samples/BIMOS/1.x.x/Demo Assets

IMPORTANT NOTE

The Sample Scene's triggers only work if User Layer 6 is BIMOSRig:

image

The Sample Scene's lighting uses Adaptive Probe Volumes. Make sure you have them enabled in the URP Asset settings:

image

Special prefabs

PedestalButton

  • Script to trigger events is DistanceTrigger in PedestalButton/Button.
  • Events under OnActivate () will be fired when Button is first pressed.
  • Events under OnDeactivate () will be fired when Button is first released.

Scripts

The sample assets contain scripts that could be helpful for level design. You can find these scripts under Add ComponentBIMOS:

image

TouchDetector

  • Can be added to a GameObject with a Collider to detect when other Colliders of certain layers enter and exit it.
    • Events added to EnterEvent () will trigger when other colliders enter a collision with the collider.
    • Events added to ExitEvent () will trigger when other colliders exit a collision with the collider.
  • The Destroy On Touch Boolean will destroy the GameObject with the script when another Collider enters a collision with it.
  • The Events will only be called if the other Collider uses a layer found in the Layer Mask.

DistanceTrigger

  • Used to detect when a transforms enters/exits a particular distance from another transform.
  • Be careful with using many of these as the distance check happens every FixedUpdate.
  • Used in the Pistol asset to determine where the slide is in relation to the rest of the gun.

SceneManager

  • Public procedures to change scene
    • Can be referenced by events
  • Quit() quits the application
  • LoadScene(sceneIndex) loads the scene at build index sceneIndex
  • LoadMainMenu() loads the scene with the name MainMenu

IDamageable

  • Can be implemented into classes to make them able to be damaged by damaging items (currently only the pistol).
  • Call TakeDamage(damageAmount) on a class that implements this interface to damage it.
  • For an example, see Target.cs in the sample assets.

Health

  • Can be added to a GameObject with a Collider to store a health value which can be decreased through damage.
    • The only damaging item so far is the Pistol.
  • The Starting Health is the health that the object will have when the game starts.
  • Events added to DeathEvent () will trigger when Health is less than or equal to 0.

CollisionSounds

  • Plays a random AudioClip from Collision Clips if a collision occurs with an Impulse greater than Threshold Impulse.
  • The Volume of the AudioSource is constant as long as the Threshold Impulse is met.
  • Used by the Cartridges that are ejected from the Pistol asset.

Respawner

  • Respawns a Prefab in the scene when Respawn() is called.
  • Respawn On Awake spawns the object when the scene loads.
  • Prefab is the prefab to be respawned.
    • Used in the demo to respawn the LargeSleds in the Slides scene.
Clone this wiki locally