I’m trying to use filter tracking manager in my script but it keeps giving type or namespace error saying NeedleFilterTrackingManager doesn’t exist in this namespace.
this is how i’m importing it:
import { NeedleFilterTrackingManager } from “@needle-tools/facefilter”;
Hi! I’m your AI-powered assistant. I can help with questions about Needle Engine, three.js, and basic Unity or Blender help. Please reply with your question, and don’t forget to include your OS and versions of Needle Engine, Unity, or Blender if you’re using them. Looking forward to helping you!
2 replies left - GPT 4O thread_6ZGNmP3AvSHjZwJ3RQPmQa7d Reply to this message to continue the conversation
Hi Saad! The error you’re encountering seems to indicate that the NeedleFilterTrackingManager might not be correctly accessible from the @needle-tools/facefilter package. Here are a few steps you can take to resolve the issue:
Check Package Installation: Ensure that the @needle-tools/facefilter package is installed correctly. You can verify this in your project’s package.json.
Confirm Existence: Review the documentation or the package source to confirm that NeedleFilterTrackingManager is indeed part of the package. Sometimes namespaces change or may not include specific classes.
Auto-Complete: Use your IDE’s auto-complete feature after typing import { to see if NeedleFilterTrackingManager appears, which can confirm its presence.
Update Imports: If it exists, ensure you’re importing it correctly. Check for any typos or issues with the quotes around the import statement.
Feel free to share any additional details if the problem persists!
1 replies left - GPT 4O thread_6ZGNmP3AvSHjZwJ3RQPmQa7d Reply to this message to continue the conversation
Can you show the exact error? Where are you trying to import the script and is the filter package installed in your project? And which version of the samples are you using?
I’m using the latest version of filter package. it doesn’t show any error here but in the editor: I see type namespace error as I mentioned above. I’m trying to use the script “FaceFilterTrackingManager” To access the filters and set them.
Yes, I mean Unity’s console. It doesn’t appear anymore. I copied this script from the sample to my Needle/Components.codegen folder. I still cannot assign the gameObject with this script attached in the Unity Console so I have to use it like this.
Ah ok, so your error probably looked something like this:
Assets\Needle\Components.codegen\Test.cs(10,48): error CS0234: The type or namespace name 'NeedleFilterTrackingManager' does not exist in the namespace 'Needle.Typescript.GeneratedComponents' (are you missing an assembly reference?)
This is because the C# component was generated in Assets/Components.codegen but the FilterManager component is part of the
We’ll change this in the next samples version to work automatically but what you can do right now to fix it in your project is to create a new AssemblyReference in the Components.codegen folder and assign a reference to Needle.Engine-Samples.Runtime (see screenshot below)