Skip to content

school-wuhahah/UnityAndroidJNI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UnityAndroidJNI

Unity Interact with android java

构建:
  • Unity导出AndroidStudio工程

  • 在UnityPlayerActivity的onCreate时初始化Device (Device.onCreate(this);)

        @Override protected void onCreate(Bundle savedInstanceState)
        {
            requestWindowFeature(Window.FEATURE_NO_TITLE);
            super.onCreate(savedInstanceState);
            Device.onCreate(this);
            mUnityPlayer = new UnityPlayer(this);
            setContentView(mUnityPlayer);
            mUnityPlayer.requestFocus();
        }
环境:
  • Unity 2018.3
  • AndroidStudio 3.2

About

Unity Interact with android java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published