Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 John.lee · Jan 16, 2016 at 04:27 PM · iosnative plugin

How do I get the Metal device for IOS within a native plugin?

I'm making an existing (pre 5.3) plugin compatible with the later unity plugin format. I have it working for Android and PC but in the sample plugin there is only D3D9, D3D11,D3D12 devices queryable. In a plugin for ios how do I query for the Metal device?

Comment
Add comment · Show 2
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 maccabbe · Jan 16, 2016 at 06:48 PM 0
Share

Is this what you are looking for? http://docs.unity3d.com/ScriptReference/iOS.DeviceGeneration.html

avatar image John.lee maccabbe · Jan 18, 2016 at 10:51 AM 0
Share

No, not what type of ios device it is. It's device as in D3D device, the rendering context to pass to the native functions that require it.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by phil_me_up · Jan 18, 2016 at 01:48 PM

If you're talking about obj-c, then you can query if metal is supported by using something like the answer posted here: http://stackoverflow.com/questions/29790663/ios-code-to-identify-metal-support-in-runtime

Note that in unity terms, if you have specified Metal as a Graphics API, then metal will be used as long as the device supports it, in which case querying for the device generation might be what you want.

You can also query the System.GraphicsDeviceType: http://docs.unity3d.com/ScriptReference/Rendering.GraphicsDeviceType.Metal.html

Comment
Add comment · 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 John.lee · Jan 18, 2016 at 03:29 PM 0
Share

No, unfortunately none of that is helpful.

I'm updating the $$anonymous$$obile$$anonymous$$ovieplayerTexture code so that it will work on IOS. It's no longer supported by the originator of it, and the plugin is not supported by unity 5.2 and above.

Following the plugin samples code here: http://docs.unity3d.com/uploads/Examples/RenderingPluginExample53.zip

I have this working for Pc android and IOS if using opengl, but the sample is missing metal support, specifically the method to get the metal device :

https://developer.apple.com/library/ios/documentation/$$anonymous$$etal/Reference/$$anonymous$$TLDevice_Ref/

The old plugin API passed the value into the plugin. The newer APi does not. All I need is the method supplied by the unity API to retreive the metal device that unity is using.

There are further samples here: https://bitbucket.org/Unity-Technologies/iosnativecodesamples but these appear not to include the API headers so cannot be compiled !

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How to render device camera feed to a texture without using WebCamTexture 0 Answers

EXC_BAD_ACCESS on PreparePresentRenderingSurface (iOS Build) 0 Answers

Force unity to free up some memory 1 Answer

FBO always 0 in native plugin IOS 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