Skip to content
  1. Home
  2. Docs
  3. Unity SDK
  4. Integrations
  5. How To Integrate Vuforia
  6. Unassign Media to a Vuforia Target

Unassign Media to a Vuforia Target

Once you have assigned media to a Vuforia Image Target, how do you unassign it? There are a few ways.

Deactivate Resource

The standard way to unassign media is to use a Deactivate Resource resource to target the Visual Marker Media or Visual Marker 3D Object resource that assigned the media. By deactivating that resource, you also deactivate the reference between the Vufoia Image Target and your selected media.

Unfortunately, Deactivate Resource cannot target resources that live in other Scripts. That means that if you assign media in some script called Script_A, then you will also have to unassign media within Script_A.

To not immediately unassign the media while the Script is being activated, place a pre-condition on the Frame that holds the Deactivate Resource resource. For example a Story Point, or User Interaction Event can be used. This way, the media will not unassign until the pre-condition has been satisfied. With Story Point or User Interaction Event, the pre-condition can be satisfied from a different script at a later time.

Close Frame

Another way to unassign media is to use a Close Frame resource and target the frame with the Visual Marker Media or Visual Marker 3D Object. This is essentially the same as using a Deactivate Resource resource.

End Script

The final way to unassign media is to “kill” the script where it was assigned. This must be done explicitly by calling Close Frame on the frame that launches the script where the media is assigned. One can also call Deactivate Resource on the Launch New Script resource that assigns media.

Was this article helpful to you? Yes No

How can we help?

Scroll To Top