• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by rawatenator · Apr 14, 2012 at 12:51 PM · c#augmented-realitynamespacequalcommqcar

Name Spaces in C# and how to access external libraries

BACKGROUND

I have a free trial of unity pro, and am using QCAR augmented Reality. I am new to C#, (but well versed in JS), so I would appreciate some help using namespaces.

I want to use the method called projectPoint, described in the QCAR documentation here: https://ar.qualcomm.at/qdevnet/api . projectPoint usage is below:

QCAR_API Vec2F QCAR::Tool::projectPoint ( const CameraCalibration & calib, const Matrix34F & pose, const Vec3F & point )

QUESTION

How can I call this function inside C# script? And, what are the necessary imports/include(s)/namespace requirements?

PAST ATTEMPTS

Note, QCAR has been properly installed because the demo code from Qualcomm works fine. However, they don't use projectPoint or any similar function so I couldn't learn the usage from the samples.

I have tried and get the following errors:

  1. include QCAR (Error: QCAR is a type, not a namespace)

  2. using QCAR::Tool (Alias QCAR not found)

just executing the function in my C# class, I also get errors:

  1. QCAR.VideoMode videoMode = QCAR::CameraDevice.getInstance().getVideoMode(CameraDevice.MODE_DEFAULT); (The nested type VideoMode' does not exist in the type QCAR')

  2. QCAR::VideoBackgroundConfig config = QCAR::Renderer::getInstance().getVideoBackgroundConfig(); (error CS1525: Unexpected symbol `::')

Comment

People who like this

0 Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rawatenator · Apr 20, 2012 at 04:27 AM 0
Share

Could somebody please suggest how to improve this question...I'm getting stuck and don't know how to get around it

1 Reply

  • Sort: 
avatar image
Best Answer

Answer by senad · Apr 20, 2012 at 06:47 AM

The code in your question is all C++. Is it possible that you are trying to link/include a C++ library from C#?

If yes, then you would have to find a wrapper dll which exposes your QCAR-library to .NET. You could also write your wrapper library yourself if one does not exist.

This is just my best guess without knowing QCAR. :)

Comment

People who like this

0 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rawatenator · Apr 20, 2012 at 04:53 PM 0
Share

You are correct. I posted on the QCAR website and they said the same thing. I have to wait until the new QCAR docs come out for unity. Thanks.

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

A namespace can only contain types and namespace declarations 2 Answers

Calling functions from other namespaces and scripts. 0 Answers

Configure default namespace for C# scripts in project? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges