Objective: Create a unique display for when the player hits the boss to make it feel like a hit has been made.
Step 1: Create/Import the animation you want to use for this.
Step 2: Make an empty object using this new image and set it to 0,0,0 then child the new damage image to it also setting it to 0,0,0
Step 3: Create a script for this object to delete after the time it’s animation runs. You can see the animation time on the timeline in order to make it accurate. Remember to attach the script to the parent
Step 4: Prefab this object and delete it from the scene I called it BossHit but you can name it whatever you’d like
Step 5: In the laser code create a handle to this game object remember to then attach the BossHit object to the laser prefab
Step 6: Upon impact with boss tag (of course create the tag and give it to the boss). Have the object instantiate.
Step 7: If you haven’t at this point toggle the Trigger on the boss’s 2d collider also create the rigidbody2 and set gravity to 0. Should be all set to test with the player now.