- Home /
How to attach an arbitrary script dynamically?
The script is: ImportedObjectsParent.AddComponent<HandGrabInteractable>();
The console reported: Assets\AppFolder\3DObjImporter\ObjImportMainScript.cs(64,48): error CS0246: The type or namespace name 'Grabbable' could not be found (are you missing a using directive or an assembly reference?)
HandGrabInteractable.cs is in Assets/Oculus/Interaction/Runtime/Scripts/Interaction/Models/HandGrabInteractable.cs
Add using projectname.grabbable to the top of your script. Looks like it cant access HandGrabInteractable.cs because its inside a namespace the script has no access to
Your answer

Follow this Question
Related Questions
Script has been enabled during the gameplay, but never called. 0 Answers
The objects use the scripts in the assets but they don't appear there when I click on them. 0 Answers
Can't use any scripts at all (Just installed engine). 0 Answers
Scripts not updating the material's shader properties 1 Answer
Flip between 2 states constantly C#? 1 Answer