Unity3d 플러그인 - managed plugins

Mobile Programming/Unity3d 2015.04.20 20:43

plugin

managed plugins

http://docs.unity3d.com/Manual/UsingDLL.html

dll 로 외부 컴파일러로 빌드, 스크립트를 컴파일 하는 것도 가능. 프로젝트에 추가되어 어떤 다른 오브젝트든, 보통 스크립트처럼 사용 가능하다.

  • Unity 에서 제공하지 않는 언어로 개발된 바이너리 로드
  • Unity 코드를 소스제공 없이 이용할 수 있게 배포

Creating a DLL

  • .NET 코드를 생성하는 컴파일러를 선택
  • Unity API 를 사용하지 않는다면 컴파일러 옵션을 적절하게 선택하는 것만으로 DLL 을 생성
  • Unity API 를 사용한다면 Unity 자체의 DLL 을 컴파일러에서 사용가능하도록 만들어야한다.
Unity API
  1. mac

    • UnityEngine.dll / UnityEditor.dll
    • /Applications/Unity/Unity.app/Contents/Frameworks/Managed/
    • contextual menu (right click on unity) > Show Package Contents command
  2. windows

    • UnityEngine.dll / UnityEditor.dll
    • C:\Program Files\Unity\Editor\Data\Managed
  3. compile option example

    1. mcs -r:/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll -target:library ClassesForDLL.cs
    2. -r : included library path
    3. -target : build type
    4. (path) name
Tutorial
  1. Add Reference on Unity DLL

    1. mac (MonoDevelop)

      • References > Edit References > .Net Assembly tab > File System > select file.
    2. windows

      • References > Add Reference > Browse > select file
  2. Write DLL Code

  3. Using DLL in Unity
    1. copy builded dll into asset folder
  4. Setting UP Debugging
    1. mac
      • copy mdb into Assets/Plugins
      • Add-in Manager > Installed tab > Unity > select Mono Soft Debugger Support For Unity > Enable
    2. windows
      • pdb to mdb
      • Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\pdb2mdb.exe


저작자 표시 비영리 변경 금지
신고

'Mobile Programming > Unity3d' 카테고리의 다른 글

Unity3d 플러그인 - managed plugins  (0) 2015.04.20

Xcode - Build Configuration

Mobile Programming/IPhone 2014.07.01 20:59

언젠가 정리하겠지 .. ?

일단 링크만.



https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/0-Introduction/introduction.html#//apple_ref/doc/uid/TP40003931-CH1-SW1

저작자 표시 비영리 변경 금지
신고

'Mobile Programming > IPhone' 카테고리의 다른 글

Xcode - Build Configuration  (0) 2014.07.01

소프트 키보드 노출에 따른 화면 레이아웃

구글 개발자 사이트에 잘 기술되어있음.

까먹어서 다시 검색한 김에 정리해 둔다.

나중에 번역해서 다시 글 수정할 예정.. 


android:windowSoftInputMode
How the main window of the activity interacts with the window containing the on-screen soft keyboard. The setting for this attribute affects two things:
  • The state of the soft keyboard — whether it is hidden or visible — when the activity becomes the focus of user attention.
  • The adjustment made to the activity's main window — whether it is resized smaller to make room for the soft keyboard or whether its contents pan to make the current focus visible when part of the window is covered by the soft keyboard.

The setting must be one of the values listed in the following table, or a combination of one "state..." value plus one "adjust..." value. Setting multiple values in either group — multiple "state..." values, for example — has undefined results. Individual values are separated by a vertical bar (|). For example:

<activity android:windowSoftInputMode="stateVisible|adjustResize" . . . >

Values set here (other than "stateUnspecified" and "adjustUnspecified") override values set in the theme.

ValueDescription
"stateUnspecified"The state of the soft keyboard (whether it is hidden or visible) is not specified. The system will choose an appropriate state or rely on the setting in the theme.

This is the default setting for the behavior of the soft keyboard.

"stateUnchanged"The soft keyboard is kept in whatever state it was last in, whether visible or hidden, when the activity comes to the fore.
"stateHidden"The soft keyboard is hidden when the user chooses the activity — that is, when the user affirmatively navigates forward to the activity, rather than backs into it because of leaving another activity.
"stateAlwaysHidden"The soft keyboard is always hidden when the activity's main window has input focus.
"stateVisible"The soft keyboard is visible when that's normally appropriate (when the user is navigating forward to the activity's main window).
"stateAlwaysVisible"The soft keyboard is made visible when the user chooses the activity — that is, when the user affirmatively navigates forward to the activity, rather than backs into it because of leaving another activity.
"adjustUnspecified"It is unspecified whether the activity's main window resizes to make room for the soft keyboard, or whether the contents of the window pan to make the current focus visible on-screen. The system will automatically select one of these modes depending on whether the content of the window has any layout views that can scroll their contents. If there is such a view, the window will be resized, on the assumption that scrolling can make all of the window's contents visible within a smaller area.

This is the default setting for the behavior of the main window.

"adjustResize"The activity's main window is always resized to make room for the soft keyboard on screen.
"adjustPan"The activity's main window is not resized to make room for the soft keyboard. Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing. This is generally less desirable than resizing, because the user may need to close the soft keyboard to get at and interact with obscured parts of the window.

This attribute was introduced in API Level 3.


저작자 표시 비영리 변경 금지
신고


티스토리 툴바