Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
0
Question by PhantomKnight · Dec 27, 2012 at 10:16 PM · c#fbxfileobj

Read .FBX file from C#

Hello!

I've been wondering for a while how I would go about creating a mesh variable from a file, preferably of the FBX file type. Is there a class that Unity3D has that I just don't know about that may let me do this, or will I have to script my own using a file line reader or something similar to that?

Thanks in advance for all replies.

-PhantomKnight.

Comment
Add comment · Show 5
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 PhantomKnight · Dec 27, 2012 at 10:09 PM 0
Share

And as another note, I'd like to be able to load files outside of the Assets folder. Otherwise my goal would be quite pointless.

avatar image whydoidoit · Dec 27, 2012 at 10:12 PM 1
Share

Theres an Asset Store asset to read OBJ files (ObjReader by @Eric5h5), I think you'd have to write your own FBX reader.

avatar image PhantomKnight · Dec 27, 2012 at 10:15 PM 0
Share

Thanks, I may get that. So if that's the only one out there, I guess there's nothing free and no default Unity3D class function for it.

avatar image whydoidoit · Dec 27, 2012 at 10:17 PM 0
Share

There is no default function and I know of nothing for free (though that's not saying I've looked).

avatar image jogo13 · Dec 27, 2012 at 10:21 PM 1
Share

you might be able to use Blender to import the fbx and export it in a unity friendly format.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by whydoidoit · Dec 27, 2012 at 10:27 PM

There is no format that can be loaded at runtime. Loading models without a 3rd party package (like ObjReader) requires Pro and the construction of Asset Bundles.

Comment
Add comment · Show 4 · 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 Bunny83 · Dec 27, 2012 at 10:43 PM 0
Share

I think that's the best answer so I converted it :)

avatar image PhantomKnight · Dec 27, 2012 at 10:57 PM 0
Share

Well every file can be read through text (although some may look like total jibberish, .obj has the cleanest text as I just noticed) and it is easily possible to load and read/create text files with C# in Unity. So with that, I guess it could take a bit of coding work to get a much simpler .obj reader which is really all I'll need. And if I get it done, I'll probably upload it elsewhere.

avatar image Bunny83 · Dec 27, 2012 at 11:12 PM 0
Share

Well your question was if unity provides any classes to import models at runtime and the answer is: no except asset bundles which requires a unity pro license.

Of course you can use a third party library or write your own if you like / be able to.

If you want to share your work, there's a scripts section in the unity wiki. Feel free to post a link here when you created a loader ;)

avatar image PhantomKnight · Dec 27, 2012 at 11:14 PM 0
Share

Ah, okay. Sorry, didn't specify enough that I wasn't only asking for a Unity function. Thanks for the responses though, everyone!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Need 3d Model for kinect 0 Answers

Why my imported fbx show semi transparent? 0 Answers

Extract Materials from fbx via script 3 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