The Pit of Unity

Source: Internet
Author: User
Tags visual studio 2010

  1. http://dearymz.blog.163.com/blog/static/20565742013341916919/
    1. Editor:
      1. Hierarchy window is the Game object list in the scene
      2. The Project window is the contents of the Assets folder on disk that you can use to create a game Object
    2. Debugging:
      1. Debug Log with Debug.Log () or Print function
      2. At present completely unable to use VisualStudio to debug, can only use MonoDevelop. Because unity is using the Mono runtime engine instead of the CLR, refer to Debugging using Visual Studio 2010
        1. Discover Unityvs plugin, Write and debug your Unity games inside Visual Studio
        2. Official Document: Debugger
      3. MonoDevelop attach debugging to unity cannot span DLLs
    3. Mono:
      1. Unity comes with mono version may be 2.6
        1. Which version of Mono used in Unity 3.2?
      2. It is now prudent to consider using mono to write long-running server programs
    4. MonoDevelop:
      1. MonoDevelop write the source file will be UTF8 Unix end of the way to save
      2. Unity comes with the MonoDevelop and official monodevelop of the difference, do not upgrade MonoDevelop
    5. Utility functions:
      1. Application.loadlevel () can switch scenes
    6. Resource management:
      1. Files are packaged with Assetbundle.
      2. All resources loaded through the resource class must be placed in a directory named "Resources"
        1. All assets that is in a folder named "Resources" anywhere in the assets folder can is accessed via the Resources.load fun Ctions. Multiple "Resources" folders may exist and if loading objects each would be examined.
        2. Directory loading rules with the same name in different resources directory cannot be predicted!
      3. Reading Excel Files and Sheets into Unity, using direct COM to read Excel in a way that does not participate in resource pipelines
      4. Reading Text Data into A Unity Game
      5. All files that need to be loaded by means of a bulk package must be uploaded via www and automatically recognize the four formats of movie, text, texture and bytes after loading
      6. Unity3d dynamically reads external files, including loading of encapsulated internal resources and loading of external bulk resources
      7. Dynamic load of resources in Unity3d Webgame
    7. Bring your own GUI:
      1. Used Guilayout.flexiblespace to center your automatic guilayout
    8. To reference a third-party library:
      1. Unity supports PInvoke (Platform invocation Services) plug-ins, some of the issues that unity encounters when loading plugin
      2. Plugins (pro/mobile-only Feature)
    9. Team work:
      1. So how does TEAMS work on A BIG Unity3d PROJECT?
    10. Compiling and Publishing:
      1. Custom build process: Build Player Pipeline
      2. The EXE released by Unity is unmanaged, but the logical DLL is placed under Game_data\managed, and the code can be completely deserialized
      3. There is no obvious direct correspondence between the file structure in the Unity compiled resource directory Game_data and the project directory in the editor.
      4. The compiled resources are placed in an encrypted file such as Sharedassets*.assets, where * may be the scene number; Scene file may have been placed in level*
      5. Resources and other directories are not the same, the other directories will be automatically packaged and merged after compilation, and resources will have a direct corresponding Resources.asset file
      6. The same source is repeatedly compiled to generate binary unchanged
      7. Game_data/maindata changes after adding empty scene
        1. Prefab and a variety of resources associated with what will be automatically processed, only the use of packaging
      8. Editor import package but no real use does not affect compilation results
      9. Game.exe is always constant.
    11. Version management:
      1. Even though the Force text option is used, many asset files are still in binary format under Projectsettings.
    12. WebBrowser Related:
      1. WPF WebBrowser interoperate with Unity3d
      2. Browser JS method can be called by Application.externalcall method
      3. WPF WebBrowser interoperate with Unity3d
    13. Font:
      1. Unity doesn ' t support vector fonts. For every font size this you want to support, you need to import a new version of the font and change its import settings to a different size. @Unity 3.x Game development by Exple beginner ' s guide[p201]
    14. Other:
      1. Unity3d Utility Summary
      2. Convert Unity JavaScript (Unityscript) to C #
      3. Unity3d screen
      4. Unity's current ability to do it on the phone, where shader is open for free
      5. It's a trick to use two-color semicircular stitching pie charts.
      6. Unity problem Set (constantly updated)
    15. Problems with writing C # scripts in Unity (Monobehaviour subclass only)
      1. Inherit from Monobehaviour
      2. Use the awake or Start function to do initialisation
      3. The class name must match the file name
      4. Coroutines has a different syntax in C #
        1. Coroutines has a return type of IEnumerator and you yield using "yield return" instead of just "yield"
      5. Don ' t use namespaces
      6. Only member variables is serialized and is shown in the Inspector
      7. Avoid using the constructor or variable initializers
        1. Never initialize any of the values in the constructor or variable initializers in a Monobehaviour script. Instead use Awake or Start for this purpose.
    16. Assertbundle
      1. The creation and use of Unity bundles
      2. Build Asset bundle. Unity3d
    17. Editor extension script:
      1. Editor script can be written in C #, after the compilation, restart unity in effect
      2. Do not use the Chinese menu in the editor script, it is possible to down the machine
      3. If garbled, you need to save the file in UTF8 format
    18. The compression method is used Lzma
    19. Unity's dynamic download level and dynamic download resources
    20. Unity3d command line build, which is useful for version creation
    21. Version control:
      1. Unity3d version control, which files should be put to SVN for problem solving
      2. The current version of Unity has put the files that require SVN control separately into project settings, and now only need to add the assets and projectsettings two directories to SVN @Using External Version Control Systems with Unity
      3. The following settings are required to add items to SVN management:
      4. Meta files are used internally for unity, do not change manually, and must be added to SVN
        1. Inside unity, a GUID is used to make inter-file references.
      5. Force text serializes the scene file into text for versioning, which defaults to binary
        1. The Unity resource serialization is using YAML
    22. Scene Loading progress bar
    23. About the Unity3d process (coroutine)
    24. NGUI:
      1. Unity3d powerful UI plug-in (NGUI)
      2. Ngui:documentation
      3. Chinese Tutorial: Unity Interface Plugin Ngui Basic tutorial
      4. Chinese Tutorial: Unity Interface Plugin Ngui Core component description
      5. A control with the same depth has a problem with Z-sort instability! Reasonable planning for complex interfaces
    25. Unity built-in package brief description
    26. Unity refers to a third-party DLL by dragging it to any directory on the project.
    27. The referenced managed DLL must be below the net3.5 version (including)
    28. If the managed DLL relies on an unmanaged DLL, the PC standalone version is feasible, the web version has security restrictions, the mobile version is not feasible, and even the System.IO namespace is restricted
    29. Protobuf
      1. Protobuf-net to use the net20 version, do not use mono version, it is said to have a pit
      2. Protobuf-csharp-port? And how to choose between Protobuf-csharp-port and Protobuf-net
    30. Micro-end Construction Assetbundle when the buildassetbundleoptions.deterministicassetbundle option, two times out of the MD5 code is not the same
    31. System.Diagnostics.Debug.Assert cannot be used in unity
      1. Debugging context in Unity3d
      2. Platform Dependent Compilation
    32. Put the extension code in a separate directory with VS development, so you can add unittest
    33. The DEBUG.LOG runtime logs output to the Output_log.txt file (UTF8) in the data directory, saving itself from writing log files.
    34. Do not open GAME.sln, but to open Game-csharp.sln, can be edited by MonoDevelop and VisualStudio at the same time
    35. After you have adjusted the project build settings, you can find a running game in the Monodevelop/run/attach to process window for Attach debugging
    36. PROTOBUF codec runs normally in Unity editor, but the issue of throwing TypeInitializationException is running on a standalone deployment
      1. If it is not normal to see the unity Editor running normally and running separately, consider changing the API compatibility level to. NET 2.0 instead of its subset
    37. Terrain:
      1. Hightmap resolution will be 1 larger than terrain resolution.
      2. It is best to use models for small terrain on mobile platforms, or to export unity's own terrain with plugins as models to save performance. Unity terrain relies on shader 2.0, some phones do not support, even if the export map is also dependent on Shader 2.0, you do the terrain Model A map can be done
      3. Skybox Settings under Edit/rendersettings/skybox material, make sure the Game overlay button is selected before it can be displayed
      4. To roam in the scene with a third person, you need to add the first personal controller to the scene
      5. Inspector Static checkbox:checking This box tells Unity, a particular object in your scene would not be moving Duri Ng the game, and as such can be lightmapped.
        ?
    38. Supports RPC, integrates raknet, supports peer-to-peer, and provides room servers and NAT traversal servers, as well as proxy servers. Open room Entertainment game without writing server logic
    39. Anything that uses rigidbodies or realistic movement should use fixedupdate, but instead of Update for every frame.
    40. UNITY-4.0.1F2 does not yet support export of Win8-metro/winphone
    41. Research on WEB MMO game development using Unity  @ Zhang Kun 2010-5-5
      1. dynamically download and load resources:
        1. WEB MMO needs to minimize first-time downloads and dynamically load resources during game runs
        2. Game Runtime resource download and load, Unity Pro supports two methods: resource bundle and Resource directory. The non-Pro version intelligently uses the resource catalog method. A resource bundle is an external collection of resources that can be used in a game with multiple resource bundles that exist outside of the release version. A resource directory is a collection of resources that are included in the release version, but are not associated with any game object. The Resource directory sets
      2. Recommendations for Web MMO products through Edit->project Settings->player's first Streamed level with resource
        1. is primarily a resource-size consideration, in which the map is the big head and you need to minimize the amount of decal usage. Cartoon games more suitable for
        2. due to the dynamic download and loading of resources will always exist, player characters in the scene moving speed should not be too large, large scenes should not be frequently switched. Dynamic download of resources requires a certain amount of network bandwidth for the player
      3. to work with unity:
        1. Unity is a game engine that contains a lot of content and functionality. It takes some time to familiarize yourself with the key features of its editor, Code and Development environment, and resource production processes. It is not recommended that you do not have a certain preparation period before the project starts
    42. Unity3d study notes, very giving a group of study notes
      1. Unity's main users are level planners and programmers
      2. Unity's support for Chinese is not very good at the moment, so try not to use Chinese in unity to prevent a variety of inexplicable anomalies
      3. How do I adjust the direction of sunlight and the Sky Box Sun map in the same direction?
        1. First, drag the angle of view in the Design view to align the center of the lens with the sun on the Sky Box
        2. Then temporarily set the Sky box to none in the render setup (for easy adjustment of Sun's angle, otherwise the sky box is too bright to see clearly)
        3. Then select sun and use the Rotate tool (accelerator e) To set the direction of the light
        4. And then restore the Sky box.
      4. A good game does not have a good soundtrack and sound effects, as if the flawless crystal lacks the foil of the light. And music can not only render the atmosphere of the game, but also increase the player's awareness of the game @ music and sound effects
      5. The properties of all prefab instances refer to the Presets from the prefab, and the corresponding instance properties change when the preset attributes change. However, when a property of an instance is manually adjusted, the value will be adjusted manually, even if the value of the preset property is modified.
      6. With the collaboration of the 360 and unity, the former's 360 secure browser preinstalled Unity3d implementation will bring great convenience to unity in the Chinese market
      7. Choosing GUI Framework for your unity3d Project:ezgui vs NGUI, part I and part II
      8. Ngui Making a small map
    43. Directional Light's Shadow Type:
      1. No Shadows
      2. Hard Shadow-The silhouette of the shadow is relatively clear
      3. Soft Shadow-Shadow edge Blur a little, more lifelike
    44. Particle systems:
      1. Particle Emitter: Just launch the particles.
      2. Particle Animator: particle animator, responsible for two processing of particles produced by the emitter, such as changing the color of particles, scaling particles, etc.
      3. Particle Renderer: Particle renderer, responsible for rendering particles into the game, and can determine the particle's material, light and shadow, etc.
    45. When an instance of prefab is selected, the Prefab object menu is displayed on the Inspector:
      1. Select: Quickly select the prefab for this instance reference in the project panel
      2. Revert: Restores all instance-modified parameters to pre-fabricated parameters
      3. Apply: All parameters modified by the instance are applied to the prefab, at which point all references to this prefabricated instance are affected together with the changes
    46. Yield usage:
      1. Unity3d using C # to achieve Coroutines & Yield
        1. All functions that use yield must return the IEnumerator type (this differs from the C # IEnumerable standard Usage!)
        2. All IEnumerator type functions must be triggered using the function "startcoroutine" and cannot be used alone
      2. How does I use Yield in C #?
      3. Overview:coroutines & Yield
      4. Monobehaviour.startcoroutine
    47. Fonts of different colors need to create different materials, their mapping is set to font map, shader to use Gui/textshader
    48. Unity Handbook Unofficial Translation version
    49. Convert Unity JavaScript (Unityscript) to C #
    50. Only public field is allowed to enter the inspector window, which can be masked by the [nonserialized] feature
      1. The values edited in Inspector are lost after the public field that is associated with the inspector window is renamed!
      2. Be aware this any value adjusted in the Inspector would override the original value given to a variable within the Script. It won't rewrite the value stated in the script, but simply replaces it when the game runs.? You can also revert to the values declared in the "script by clicking" on the Cog icon to the right of the component and Cho Osing Reset from the Drop-down menu that appears.
      3. Public property will not enter Instactor
      4. Enum is automatically displayed as a ComboBox in Inspector
    51. Dynamic invocation, decoupling artifact:
      1. Dynamic method calls can be made through the SendMessage Method!
      2. You can use the Find/findwithtag method to find the Gameobject object directly using the string name
    52. Drag prefab directly into the scene to view
    53. Where can I find the unityengine XML?, Unity does not provide an XML document corresponding to the engine DLL, which is unfriendly to the automatic hints under VisualStudio
    54. WCF & Unity
      1. The code for the service references can be VisualStudio with the "Add Service Reference" feature, and there is no need for a non-command line with Mono's svcutil. After a successful build, the corresponding C # code file needs to be copied to the appropriate directory under Assert, otherwise it will not participate in the compilation
      2. DLLs that need to be copied from C:\Program Files (x86) \unity\editor\data\mono\lib\mono\2.0 to *\assets\plugins are:
        1. System.Runtime.Serialization.dll
        2. System.Security.dll
        3. System.ServiceModel.dll
        4. System.IdentityModel.Selectors.dll//The file is also necessary, otherwise System.ServiceModel.dll will not be introduced correctly
      3. Consuming a WCF Service from Unity3d
      4. Is it possible-use WCF in scripts?
      5. WebServices in Unity
      6. Small tutorial on using WCF services in Unity
    55. The two project files that unity automatically generates, *-csharp.sln/*-vs.csproj or *.sln/*.csproj, are for VS, and the latter is for MonoDevelop, which contains the custom project type *.unityproj
    56. Do not manually add any project to *-csharp.sln, which is overwritten after unity is regenerated. You can save the SLN as a workaround
    57. NGUI
      1. Unity Interface Plugin Ngui Basic tutorial
      2. Unity Interface Plugin Ngui Core component description
      3. Ngui:documentation
        1. Unity3d interface Plug-in Ngui
      4. Adjust Ngui "Mickey Mouse" size:
    58. Texturepacker is a GUI and command line tool to create sprite sheets or sprite atlases
      1. Request free license
      2. Works with any Game Engine, including cocos2d, Cegui, Unity, and more, for easy customization of output formats
    59. Unity Dual Open:
    60. No embedded browser support embed Web Browser into unity
    61. The new GUI will be supported in the subsequent Unity new version
    62. Bitverse GUI Library, the mobile platform will encounter performance problems, but the development efficiency is higher than Ngui
    63. Unity Script Cycle Relationships

The Pit of Unity

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.