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 diamond2004 · Mar 14, 2014 at 09:51 PM · textureunity-androidimage loader

Draw using android openGL?

Hi, I am very new to unity and maybe my question is too silly. I would like to load images from my android java code on Unity textures? is that even possible? and if yes How? (I am using unity 4.2)

Update:

My final goal is to have the logic for finding/loading the image in the android code and just use the unity to provide the 3D environment. Basically use android opengl to load the image.

off the top of my head this is what I want to do: 1- create a plane in unity. 2- generate a texture for the plane and pass the texture or id of the texture to my .jar plugin. 2- in my .jar file there is a method that loads an image on to a texture. 3- send the texture to unity or tell unity to update the texture.

Comment
Add comment · 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 shopguy · Mar 14, 2014 at 10:30 PM 0
Share

I think you can call native code with the PRO version only (and need Android PRO also), if that is what you mean. If you just want to move images from an existing java project to Unity, please clarify, that should be easy (just copy files to Assets folder).

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by shopguy · Mar 14, 2014 at 10:32 PM

If I understand the question I might be able to provide a better answer, but I think this is what you are looking for:

http://docs.unity3d.com/Documentation/Manual/Plugins.html

and Android specific:

http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html

Basically, you need to compile your java project to a library and include in your Unity project, then follow the rest of the steps to call in to it.

Comment
Add comment · Show 2 · 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 diamond2004 · Mar 15, 2014 at 12:53 AM 0
Share

Thank you for your response. I updated my question.

avatar image shopguy · Mar 17, 2014 at 10:29 PM 0
Share

Read your update. As I don't have Unity Pro I really don't know much about details of calling native code. Once you figure that out, if you aren't able to pass actual images/texture/game-objects back and forth, you might be able to kludge something using files. http://answers.unity3d.com/questions/30147/loading-images-textures-resourcesload-vs-wwwtextur.html gives some ways to load images from file.

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

21 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Assigning UV Map to model at runtime 0 Answers

How do I import TGA, DDS, GIF, PCX and BMP files at runtime? 1 Answer

Loading imagesequence at runtime - memory problem 1 Answer

Animating a texture on an FBX import from Maya 0 Answers

What is the Illumination texture name 1 Answer


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