CN105893046A - Flexible Unity3D and Android combined usage method - Google Patents

Flexible Unity3D and Android combined usage method Download PDF

Info

Publication number
CN105893046A
CN105893046A CN201610198615.9A CN201610198615A CN105893046A CN 105893046 A CN105893046 A CN 105893046A CN 201610198615 A CN201610198615 A CN 201610198615A CN 105893046 A CN105893046 A CN 105893046A
Authority
CN
China
Prior art keywords
android
unity3d
view
flexible
scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610198615.9A
Other languages
Chinese (zh)
Inventor
闫森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Main Goal Software Technology Co Ltd
Original Assignee
Suzhou Main Goal Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Main Goal Software Technology Co Ltd filed Critical Suzhou Main Goal Software Technology Co Ltd
Priority to CN201610198615.9A priority Critical patent/CN105893046A/en
Publication of CN105893046A publication Critical patent/CN105893046A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Abstract

The invention discloses a flexible Unity3D and Android combined usage method which is a method integrating Unity3D to Android so as to achieve flexible usage of 3D scenes. The flexible Unity3D and Android combined usage method is based on a Unity3D graphics engine system supporting an Android platform, and Android flexible loading in 3D Internet products and Unity3D based 3D effects are designed and completed. The flexible Unity3D and Android combined usage method integrates 3D to an Android app, the problem that the app cannot achieve big data sand table display is solved, user habits are retained, and convenience is brought to user usage. The 3D is enabled when being needed and stops memory usage when being not needed, and user experience is improved.

Description

A kind of method that Unity3D with Android is used in combination flexibly
Technical field
Along with the continuous progress of 3D technology, increasing product and application are all presenting to user, net in the way of 3D The every field such as network game, education, ecommerce.
Simultaneously along with the development of mobile Internet, more and more people use surfing Internet with cell phone, 3D to also appear on mobile phone.
Background technology
Traditional 3D is illustrated in mobile phone application, is that the software using multi-platform support directly generates.The most flexibly will 3D uses as a control.
Maturation based on Unity3D technology, can use the 3D scene that Unity3D makes at present in Android platform Use flexibly.
Summary of the invention
1, the purpose of the present invention.
The present invention is to solve that in prior art, 3D showing internal memory space hold is too much, speed mode that is slow and that show is inadequate The problem such as flexibly, it is proposed that a kind of method that Unity3D with Android is used in combination flexibly.
2, the technical solution adopted in the present invention.
The method that Unity3D with Android of the present invention is used in combination flexibly, in accordance with the following steps:
Step 1 Android and Unity3D combines:
Step 1.1) on the basis of original Android engineering, add the literary composition of the Android engineering that part Unity3D derives Part, then proceeds by exploitation compiling;
Step 1.2) will show that UnityPlayerActivity is inherited at the interface of 3D, then mUnityPlayer view is added It is added in view to be shown.
Step 2, the 3D scene interactivity of Android and Unity3D:
Step 2.1) when needing to show, the mUnityPlayer that 3D shows is displayed, and is sent out by the api of Unity3D Send the message of the building sand table image needing loading so that it is start to load 3D data;
Step 2.2) after 3D data have loaded and 3D scene carry out building partial information switching show, switch full frame exhibition Show;
Step 2.3) Android uses the static method of UnityPlayer class of Unity3D to go to call to Unity3D messaging The method of unity, Unity3D sends message to Android and uses AndroidJavaObject class to call Android's Method;
Step 2.4) when switching full frame when, Android interface is hidden except the view of 3D, and then transmission message is drawn to Unity Hold up and carry out full frame, exit the view that full screen display hides and be then also required to transmit message and carry out the switching of view to Unity engine.
Further in specific embodiment, the when that described step 2.2 entering 3D full screen scene, hidden parts is used to regard The method full frame displaying 3D scene of figure.
3, beneficial effects of the present invention.
1) 3D is attached in Android app, solves app and cannot realize the difficult problem that big data sand table is shown, retain User habit and be user-friendly to.
2) displaying 3D model wicket, conveniently checks.
3) need use 3D when enable, it is not necessary to when close save internal memory, improve Consumer's Experience sense.
Accompanying drawing explanation
Fig. 1 is the flow chart of the present invention.
Detailed description of the invention
In order to enable the auditor especially public of Patent Office to be more clearly understood from the technical spirit of the present invention and to have Benefit effect, applicant will elaborate below by way of example, but the description to embodiment is not to this The restriction of bright scheme, any pro forma rather than substantial equivalent transformation that is only made according to present inventive concept is all answered It is considered as technical scheme category.
Embodiment
The present invention is that a mobile terminal 3D sees that room mobile phone app applies " Mei Fangquan ".
In this application, utilizing this method, it is achieved that shown flexibly in the application by 3D, concrete implementation mode is such as Under:
1, the associated documents in the Android engineering derive Unity3D add in original project, it is also possible to directly to derivation Engineering modify, will show that UnityPlayerActivity class is inherited at the interface of 3D, and this interface will be placed in an independence Process in.
2, go to call the method for Unity thus Transfer Parameters by UnitySendMessage () method.
3, Unity go the correlation technique calling Android to remove Transfer Parameters by AndroidJavaObject class.
Such as:
The meaning of above-mentioned code calls the getName () method inside Android exactly, obtains the return value of the method.
4, need to use entering 3D full screen scene when and hide relevant view and call the correlation technique of Unity, Thus full frame displaying 3D scene.
5, need the view that display is hidden, the switching of Unity scene view to be done the when of exiting full frame.

Claims (2)

1. the method that Unity3D with Android is used in combination flexibly, it is characterised in that in accordance with the following steps:
Step 1 Android and Unity3D combines:
Step 1.1) on the basis of original Android engineering, add the literary composition of the Android engineering that part Unity3D derives Part, then proceeds by exploitation compiling;
Step 1.2) will show that UnityPlayerActivity is inherited at the interface of 3D, then mUnityPlayer view is added It is added in view to be shown;
Step 2, the 3D scene interactivity of Android and Unity3D:
Step 2.1) when needing to show, the mUnityPlayer that 3D shows is displayed, and is sent out by the api of Unity3D Send the message of the building sand table image needing loading so that it is start to load 3D data;
Step 2.2) after 3D data have loaded and 3D scene carry out building partial information switching show, switch full frame exhibition Show;
Step 2.3) Android uses the static method of UnityPlayer class of Unity3D to go to call to Unity3D messaging The method of unity, Unity3D sends message to Android and uses AndroidJavaObject class to call Android's Method;
Step 2.4) when switching full frame when, Android interface is hidden except the view of 3D, and then transmission message is drawn to Unity Hold up and carry out full frame, exit the view that full screen display hides and be then also required to transmit message and carry out the switching of view to Unity engine.
The method that Unity3D with Android the most according to claim 1 is used in combination flexibly, it is characterised in that: described step The method full frame displaying 3D scene of hidden parts view is used the when of entering 3D full screen scene in rapid 2.2.
CN201610198615.9A 2016-04-01 2016-04-01 Flexible Unity3D and Android combined usage method Pending CN105893046A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610198615.9A CN105893046A (en) 2016-04-01 2016-04-01 Flexible Unity3D and Android combined usage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610198615.9A CN105893046A (en) 2016-04-01 2016-04-01 Flexible Unity3D and Android combined usage method

Publications (1)

Publication Number Publication Date
CN105893046A true CN105893046A (en) 2016-08-24

Family

ID=57011987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610198615.9A Pending CN105893046A (en) 2016-04-01 2016-04-01 Flexible Unity3D and Android combined usage method

Country Status (1)

Country Link
CN (1) CN105893046A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815021A (en) * 2016-12-30 2017-06-09 北京星辰美豆文化传播有限公司 A kind of operation processing method of application, apparatus and system
CN107066266A (en) * 2017-03-22 2017-08-18 北京潘达互娱科技有限公司 Unity data processing method and device is supported in Android application
CN107066257A (en) * 2017-03-06 2017-08-18 北京潘达互娱科技有限公司 A kind of method for packing and device by Unity to Android
CN108108163A (en) * 2017-11-10 2018-06-01 广东电网有限责任公司教育培训评价中心 Distribution core business 3D trains courseware APP development method
CN109636907A (en) * 2018-12-13 2019-04-16 谷东科技有限公司 A kind of terrain reconstruction method and system based on AR glasses
CN109840091A (en) * 2018-12-12 2019-06-04 珠海西山居互动娱乐科技有限公司 A kind of resource dynamic replacement based on the trip of Unity hand goes out the method and device thereof of packet

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504576A (en) * 2015-01-10 2015-04-08 闽江学院 Method for achieving three-dimensional display interaction of clothes and platform

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504576A (en) * 2015-01-10 2015-04-08 闽江学院 Method for achieving three-dimensional display interaction of clothes and platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
秦元培: "Unity3D游戏开发之在Android视图中嵌入Unity视图", 《HTTP://BLOG.CSDN.NET/QINYUANPEI/ARTICLE/DETAILS/39380717》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815021A (en) * 2016-12-30 2017-06-09 北京星辰美豆文化传播有限公司 A kind of operation processing method of application, apparatus and system
CN107066257A (en) * 2017-03-06 2017-08-18 北京潘达互娱科技有限公司 A kind of method for packing and device by Unity to Android
CN107066266A (en) * 2017-03-22 2017-08-18 北京潘达互娱科技有限公司 Unity data processing method and device is supported in Android application
CN108108163A (en) * 2017-11-10 2018-06-01 广东电网有限责任公司教育培训评价中心 Distribution core business 3D trains courseware APP development method
CN109840091A (en) * 2018-12-12 2019-06-04 珠海西山居互动娱乐科技有限公司 A kind of resource dynamic replacement based on the trip of Unity hand goes out the method and device thereof of packet
CN109636907A (en) * 2018-12-13 2019-04-16 谷东科技有限公司 A kind of terrain reconstruction method and system based on AR glasses

Similar Documents

Publication Publication Date Title
CN105893046A (en) Flexible Unity3D and Android combined usage method
CN104765614B (en) Color in processing method and processing device
US11178358B2 (en) Method and apparatus for generating video file, and storage medium
CN103530018B (en) The method for building up and mobile terminal at widget interface in Android operation system
CN104980563B (en) Operate demenstration method and operation apparatus for demonstrating
CN106817349B (en) Method and device for enabling communication interface to generate animation effect in communication process
CN109510902B (en) Method and device for information interaction between calling parties
WO2013004890A1 (en) Method, apparatus, and computer program product for shared synchronous viewing of content
US9514718B2 (en) Information processing system, information processing apparatus, and information processing method
CN107358659B (en) Multi-picture fusion display method based on 3D technology and storage device
CN106412229A (en) Interaction method and device for mobile terminal, and the mobile terminal
CN107027068A (en) Rendering intent, coding/decoding method, the method and device for playing multimedia data stream
CN109963201A (en) A kind of real-time shopping method, system, intelligent TV network and storage medium
CN113141537A (en) Video frame insertion method, device, storage medium and terminal
CN111064863A (en) Image data processing method and related device
CN101364298A (en) Mobile phone on-net emulation and tryout system and method
CN106371817A (en) Unity3D and iOS flexible combined use method
KR20110099414A (en) Apparatus and method for providing animation effect in portable terminal
CN104461219A (en) Devices and method for processing information
CN106027815A (en) Incoming call information display method and system, server and client
CN106648606A (en) Method and device for displaying information
CN104199681A (en) Method for achieving live wallpaper on basis of QNX platform
US20180373396A1 (en) Theme data
KR101403226B1 (en) system and method for transferring message
CN109634695A (en) A kind of method and device of the interface SDK automatic adaptation software horizontal/vertical screen

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160824