Once you have assigned media to a Vuforia Image Target, how do you unassign it? There are a few ways.
The standard way to unassign media is to use a [permalink id=’1856′ text=’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 [permalink id=1843 text=’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 [permalink id=1846 text=’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.
Another way to unassign media is to use a [permalink id=1854 text=’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.
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.