찾기
내용으로 건너뛰기
추적
•
svg
•
smart_converter
•
etc_hosts
•
sftp_net_drive
•
midnight_commander
문서의 이전 판을 선택했습니다!
저장하면 이 자료로 새 판을 만듭니다.
미디어 파일
======Building Plugins for Desktop Platforms====== This page describes [[Plugins|Native Code Plugins]] for desktop platforms (Windows/Mac OS X) . Note that plugins are intentionally disabled in webplayers for security reasons. =====Building a Plugin for Mac OS X===== On Mac OSX, [[Plugins|plugins]] are deployed as bundles. You can create the bundle project with XCode by selecting **File->NewProject...** and then selecting Bundle - Carbon/Cocoa Loadable Bundle. If you are using C++ (.cpp) or Objective-C (.mm) to implement the plugin then you must ensure the functions are declared with C linkage to avoid [[http://en.wikipedia.org/wiki/Name_mangling|name mangling issues]]. <file csharp>extern "C" { float FooPluginFunction (); } </file> =====Building a Plugin for Windows===== Plugins on Windows are DLL files with exported functions. Practically any language or development environment that can create DLL files can be used to create plugins.\\ As with Mac OSX, you should declare any C++ functions with C linkage to avoid name mangling issues. =====Using your plugin from C#===== Once built, the bundle should be placed in the **Assets->Plugins** folder in the Unity project. Unity will then find it by name when you define a function like this in the C# script:- <file csharp>[DllImport ("PluginName")] private static extern float FooPluginFunction (); </file> Please note that //PluginName// should not include the extension of the filename. Be aware that whenever you change code in the Plugin you will need to recompile scripts in your project or else the plugin will not have the latest compiled code. =====Deployment===== For cross platform plugins you must include both the .bundle (for Mac) and .dll (for Windows) files in the Plugins folder. No further work is then required on your side - Unity automatically picks the right plugin for the target platform and includes it with the player. =====Examples===== ====Simplest Plugin==== This plugin project implements only some very basic operations (print a number, print a string, add two floats, add two integers). This example may be helpful if this is your first Unity plugin.\\ The project can be found [[Attach:SimplestPluginExample.zip|here]] and includes both Windows and Mac project files. ====Rendering from C++ code==== An example multiplatform plugin that works with multithreaded rendering in Unity can be found on the [[Native Plugin Interface]] page. ====Midi Plugin==== A complete example of the Plugin interface can be found [[http://unity3d.com/tutorials/midiplugin.zip|here]]. This is a complete Midi plugin for OS X which uses Apple's CoreMidi API. It provides a simple C API and a C# class to access it from Unity. The C# class contains a high level API, with easy access to NoteOn and NoteOff events and their velocity. ====Texture Plugin==== An example of how to assign image data to a texture directly in OpenGL (note that this will only work when Unity is using an OpenGL renderer). This example includes both XCode and Visual Studio project files. The plugin, along with an accompanying Unity project, can be found [[http://unity3d.com/support/resources/example-projects/texture-plugins|here]]. {{tag>유니티 unity}} * 출처: [[http://unitykoreawiki.com/index.php?n=KrMain.PluginsForDesktop|유니티코리아위키]] (CC BY-NC-SA 2.0)
2+1?
이 필드는 비어 있도록 유지하세요:
저장
미리 보기
취소
편집 요약
참고: 이 문서를 편집하면 내용은 다음 라이선스에 따라 배포하는 데 동의하는 것으로 간주합니다:
CC Attribution-Noncommercial-Share Alike 4.0 International
연결문서
유니티3D ( Unity3D )
플러그인 (프로/모바일만 지원) Plugins (Pro/Mobile-only feature)
문서 도구
문서 보기
이전 판
연결문서
맨 위로
다크 모드로 보기
☀️
Toggle Menu
유니티3D ( Unity3D )
너두 고쳐두 됩니다.
사이트 도구
최근 바뀜
미디어 관리자
사이트맵
사용자 도구
등록
로긴
최근 수정된 문서
start-up_stopped
semen_analysis
[정액검사결과 정상치]
페러데이_저가_투어
[페러데이 저가 투어]
php
[safe mode 를 사용하라]
complex_regional_pain_syndrome
dj_java_decompiler
[자바 디컴파일러 (Dj Java Decompiler)]
std024
↷ 링크가 이동 작업으로 인해 적응했습니다
misuse_preca4
↷ 링크가 이동 작업으로 인해 적응했습니다
misuse_nobason6
↷ 링크가 이동 작업으로 인해 적응했습니다
herpes_simplex
↷ 링크가 이동 작업으로 인해 적응했습니다
임신_중_음부포진_감염
↷ 링크가 이동 작업으로 인해 적응했습니다
외음부
↷ 링크가 이동 작업으로 인해 적응했습니다
genital_herpes
연성하감
↷ 링크가 이동 작업으로 인해 적응했습니다
섹스
↷ 링크가 이동 작업으로 인해 적응했습니다
성병예방_치료
↷ 링크가 이동 작업으로 인해 적응했습니다
성병
↷ 링크가 이동 작업으로 인해 적응했습니다