Created
September 6, 2012 06:49
-
-
Save mainyaa/3652252 to your computer and use it in GitHub Desktop.
Diff Unity Docmentation 3.5.5 <-> 4.0pre
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Only in /Applications/Unity4.0/Documentation/: .DS_Store | |
Common subdirectories: /Applications/Unity/Documentation/Components and /Applications/Unity4.0/Documentation/Components | |
Common subdirectories: /Applications/Unity/Documentation/Images and /Applications/Unity4.0/Documentation/Images | |
Common subdirectories: /Applications/Unity/Documentation/Manual and /Applications/Unity4.0/Documentation/Manual | |
Common subdirectories: /Applications/Unity/Documentation/ScriptReference and /Applications/Unity4.0/Documentation/ScriptReference | |
diff --side-by-side /Applications/Unity/Documentation/legal.txt /Applications/Unity4.0/Documentation/legal.txt | |
UNITY 3.5 CONTAINS THE FOLLOWING THIRD PARTY LIBRARIES: UNITY 3.5 CONTAINS THE FOLLOWING THIRD PARTY LIBRARIES: | |
PhysX physics library. Copyright ? 2003-2008 by NVIDIA Corpor PhysX physics library. Copyright ? 2003-2008 by NVIDIA Corpor | |
Beast Copyright ? Autodesk, Inc.Raknet s Copyright ? Jenkin Beast Copyright ? Autodesk, Inc.Raknet s Copyright ? Jenkin | |
Umbra Copyright ? Umbra Software Ltd Umbra Copyright ? Umbra Software Ltd | |
FMOD Copyright ? Firelight Technologies Pty, Ltd. FMOD Copyright ? Firelight Technologies Pty, Ltd. | |
Substance Copyright ? Allegorithmic Substance Copyright ? Allegorithmic | |
Tetgen Copyright ? Hang Si of the Research Group: Numerical M Tetgen Copyright ? Hang Si of the Research Group: Numerical M | |
Weierstrass Institute for Applied Analysis and Stochastics (W Weierstrass Institute for Applied Analysis and Stochastics (W | |
The Mono runtime libraries are licensed from Xamarin. The Mono runtime libraries are licensed from Xamarin. | |
The Mono C# Compiler and Tools, Copyright ? 2005 - 2008 Novel The Mono C# Compiler and Tools, Copyright ? 2005 - 2008 Novel | |
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or | |
This program is distributed in the hope that it will be usefu This program is distributed in the hope that it will be usefu | |
You should have received a copy of the GNU General Public Lic You should have received a copy of the GNU General Public Lic | |
The Mono Class Library, Copyright ? 2005 - 2008 Novell, Inc. The Mono Class Library, Copyright ? 2005 - 2008 Novell, Inc. | |
Permission is hereby granted, free of charge, to any person o Permission is hereby granted, free of charge, to any person o | |
MonoDevelop is licensed under the MIT/X11 license. The modifi MonoDevelop is licensed under the MIT/X11 license. The modifi | |
Boo, Copyright ? 2003 - 2008 Rodrigo B. Oliveira Boo, Copyright ? 2003 - 2008 Rodrigo B. Oliveira | |
Redistribution and use in source and binary forms, with or wi Redistribution and use in source and binary forms, with or wi | |
Redistributions of source code must retain the above copyrigh Redistributions of source code must retain the above copyrigh | |
Redistributions in binary form must reproduce the above copyr Redistributions in binary form must reproduce the above copyr | |
Neither the name of Rodrigo B. de Oliveira nor the names of i Neither the name of Rodrigo B. de Oliveira nor the names of i | |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRI THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRI | |
UnityScript, Copyright ? 2005 - 2008 Rodrigo B. Oliveira UnityScript, Copyright ? 2005 - 2008 Rodrigo B. Oliveira | |
Redistribution and use in source and binary forms, with or wi Redistribution and use in source and binary forms, with or wi | |
Redistributions of source code must retain the above copyrigh Redistributions of source code must retain the above copyrigh | |
Redistributions in binary form must reproduce the above copyr Redistributions in binary form must reproduce the above copyr | |
Neither the name of Rodrigo B. de Oliveira nor the names of i Neither the name of Rodrigo B. de Oliveira nor the names of i | |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRI THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRI | |
libvorbis. Copyright (c) 2002-2009 Xiph.org Foundation libvorbis. Copyright (c) 2002-2009 Xiph.org Foundation | |
Redistribution and use in source and binary forms, with or wi Redistribution and use in source and binary forms, with or wi | |
Redistributions of source code must retain the above copyrigh Redistributions of source code must retain the above copyrigh | |
Redistributions in binary form must reproduce the above copyr Redistributions in binary form must reproduce the above copyr | |
Neither the name of the Xiph.org Foundation nor the names of Neither the name of the Xiph.org Foundation nor the names of | |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRI THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRI | |
libtheora. Copyright (c) 2002-2009 Xiph.org Foundation libtheora. Copyright (c) 2002-2009 Xiph.org Foundation | |
Redistribution and use in source and binary forms, with or wi Redistribution and use in source and binary forms, with or wi | |
Redistributions of source code must retain the above copyrigh Redistributions of source code must retain the above copyrigh | |
Redistributions in binary form must reproduce the above copyr Redistributions in binary form must reproduce the above copyr | |
Neither the name of the Xiph.org Foundation nor the names of Neither the name of the Xiph.org Foundation nor the names of | |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRI THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRI | |
zlib general purpose compression library. Copyright (c) 1995- zlib general purpose compression library. Copyright (c) 1995- | |
This software is provided 'as-is', without any express or imp This software is provided 'as-is', without any express or imp | |
libpng PNG reference library libpng PNG reference library | |
Copyright (c) 1998-2007 Glenn Randers-Pehrson. Copyright (c) 1998-2007 Glenn Randers-Pehrson. | |
Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger. Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger. | |
Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Grou Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Grou | |
The PNG Reference Library is supplied "AS IS". The Contributi The PNG Reference Library is supplied "AS IS". The Contributi | |
jpeglib JPEG library. Copyright (C) 1991-1998, Thomas G. Lane jpeglib JPEG library. Copyright (C) 1991-1998, Thomas G. Lane | |
This software is based in part on the work of the Independent This software is based in part on the work of the Independent | |
Twilight Prophecy SDK, a multi-platform development system fo Twilight Prophecy SDK, a multi-platform development system fo | |
This software is provided 'as-is', without any express or imp This software is provided 'as-is', without any express or imp | |
dynamic_bitset, Copyright ? Chuck Allison and Jeremy Siek 200 dynamic_bitset, Copyright ? Chuck Allison and Jeremy Siek 200 | |
Permission to copy, use, modify, sell and distribute this sof Permission to copy, use, modify, sell and distribute this sof | |
libcurl. Copyright (c) 1996 - 2008, Daniel Stenberg <daniel@h libcurl. Copyright (c) 1996 - 2008, Daniel Stenberg <daniel@h | |
All rights reserved. All rights reserved. | |
Permission to use, copy, modify, and distribute this software Permission to use, copy, modify, and distribute this software | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIN THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIN | |
Except as contained in this notice, the name of a copyright h Except as contained in this notice, the name of a copyright h | |
PostgreSQL Database Management System (formerly known as Post PostgreSQL Database Management System (formerly known as Post | |
Portions Copyright (c) 1996 - 2005, The PostgreSQL Global Dev Portions Copyright (c) 1996 - 2005, The PostgreSQL Global Dev | |
Portions Copyright (c) 1994, The Regents of the University of Portions Copyright (c) 1994, The Regents of the University of | |
Permission to use, copy, modify, and distribute this software Permission to use, copy, modify, and distribute this software | |
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO A IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO A | |
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRA THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRA | |
FreeType. Copyright (c) 2007 The FreeType Project (www.freety FreeType. Copyright (c) 2007 The FreeType Project (www.freety | |
All rights reserved. All rights reserved. | |
THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF | |
No Warranties. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE No Warranties. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE | |
No Liability for Consequential Damages. TO THE MAXIMUM EXTENT No Liability for Consequential Damages. TO THE MAXIMUM EXTENT | |
Scintilla and SciTE. Copyright (c) 1998-2008 by Neil Hodgson Scintilla and SciTE. Copyright (c) 1998-2008 by Neil Hodgson | |
All Rights Reserved. All Rights Reserved. | |
Permission to use, copy, modify, and distribute this software Permission to use, copy, modify, and distribute this software | |
NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOF NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOF | |
7-Zip Command line version. Copyright (c) 1999-2007 Igor Pavl 7-Zip Command line version. Copyright (c) 1999-2007 Igor Pavl | |
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or | |
This library is distributed in the hope that it will be usefu This library is distributed in the hope that it will be usefu | |
You should have received a copy of the GNU Library General Pu You should have received a copy of the GNU Library General Pu | |
AES code. Copyright (c) 2001, Dr Brian Gladman AES code. Copyright (c) 2001, Dr Brian Gladman | |
The free distribution and use of this software in both source The free distribution and use of this software in both source | |
1. distributions of this source code include the above copyri 1. distributions of this source code include the above copyri | |
2. distributions in binary form include the above copyright n 2. distributions in binary form include the above copyright n | |
3. the copyright holder's name is not used to endorse product 3. the copyright holder's name is not used to endorse product | |
DISCLAIMER: This software is provided 'as is' with no explici DISCLAIMER: This software is provided 'as is' with no explici | |
FreeImage open source image library. Copyright (c) 2003-2008 FreeImage open source image library. Copyright (c) 2003-2008 | |
FreeImage is used under the FreeImage Public License, version FreeImage is used under the FreeImage Public License, version | |
1. Definitions. 1. Definitions. | |
1.1. "Contributor" means each entity that creates or contribu 1.1. "Contributor" means each entity that creates or contribu | |
1.2. "Contributor Version" means the combination of the Origi 1.2. "Contributor Version" means the combination of the Origi | |
1.3. "Covered Code" means the Original Code or Modifications 1.3. "Covered Code" means the Original Code or Modifications | |
1.4. "Electronic Distribution Mechanism" means a mechanism ge 1.4. "Electronic Distribution Mechanism" means a mechanism ge | |
1.5. "Executable" means Covered Code in any form other than S 1.5. "Executable" means Covered Code in any form other than S | |
1.6. "Initial Developer" means the individual or entity ident 1.6. "Initial Developer" means the individual or entity ident | |
1.7. "Larger Work" means a work which combines Covered Code o 1.7. "Larger Work" means a work which combines Covered Code o | |
1.8. "License" means this document. 1.8. "License" means this document. | |
1.9. "Modifications" means any addition to or deletion from t 1.9. "Modifications" means any addition to or deletion from t | |
A. Any addition to or deletion from the contents of a file co A. Any addition to or deletion from the contents of a file co | |
B. Any new file that contains any part of the Original Code o B. Any new file that contains any part of the Original Code o | |
1.10. "Original Code" means Source Code of computer software 1.10. "Original Code" means Source Code of computer software | |
1.11. "Source Code" means the preferred form of the Covered C 1.11. "Source Code" means the preferred form of the Covered C | |
1.12. "You" means an individual or a legal entity exercising 1.12. "You" means an individual or a legal entity exercising | |
2. Source Code License. 2. Source Code License. | |
2.1. The Initial Developer Grant. The Initial Developer hereb 2.1. The Initial Developer Grant. The Initial Developer hereb | |
(a) to use, reproduce, modify, display, perform, sublicense a (a) to use, reproduce, modify, display, perform, sublicense a | |
(b) under patents now or hereafter owned or controlled by Ini (b) under patents now or hereafter owned or controlled by Ini | |
2.2. Contributor Grant. Each Contributor hereby grants You a 2.2. Contributor Grant. Each Contributor hereby grants You a | |
(a) to use, reproduce, modify, display, perform, sublicense a (a) to use, reproduce, modify, display, perform, sublicense a | |
(b) under patents now or hereafter owned or controlled by Con (b) under patents now or hereafter owned or controlled by Con | |
3. Distribution Obligations. 3. Distribution Obligations. | |
3.1. Application of License. 3.1. Application of License. | |
The Modifications which You create or to which You contribute The Modifications which You create or to which You contribute | |
3.2. Availability of Source Code. 3.2. Availability of Source Code. | |
Any Modification which You create or to which You contribute Any Modification which You create or to which You contribute | |
3.3. Description of Modifications. 3.3. Description of Modifications. | |
You must cause all Covered Code to which you contribute to co You must cause all Covered Code to which you contribute to co | |
3.4. Intellectual Property Matters 3.4. Intellectual Property Matters | |
(a) Third Party Claims. (a) Third Party Claims. | |
If You have knowledge that a party claims an intellectual pro If You have knowledge that a party claims an intellectual pro | |
(b) Contributor APIs. (b) Contributor APIs. | |
If Your Modification is an application programming interface If Your Modification is an application programming interface | |
3.5. Required Notices. 3.5. Required Notices. | |
You must duplicate the notice in Exhibit A in each file of th You must duplicate the notice in Exhibit A in each file of th | |
3.6. Distribution of Executable Versions. 3.6. Distribution of Executable Versions. | |
You may distribute Covered Code in Executable form only if th You may distribute Covered Code in Executable form only if th | |
3.7. Larger Works. 3.7. Larger Works. | |
You may create a Larger Work by combining Covered Code with o You may create a Larger Work by combining Covered Code with o | |
4. Inability to Comply Due to Statute or Regulation. 4. Inability to Comply Due to Statute or Regulation. | |
If it is impossible for You to comply with any of the terms o If it is impossible for You to comply with any of the terms o | |
5. Application of this License. 5. Application of this License. | |
This License applies to code to which the Initial Developer h This License applies to code to which the Initial Developer h | |
6. Versions of the License. 6. Versions of the License. | |
6.1. New Versions. 6.1. New Versions. | |
Floris van den Berg may publish revised and/or new versions o Floris van den Berg may publish revised and/or new versions o | |
6.2. Effect of New Versions. 6.2. Effect of New Versions. | |
Once Covered Code has been published under a particular versi Once Covered Code has been published under a particular versi | |
6.3. Derivative Works. 6.3. Derivative Works. | |
If you create or use a modified version of this License (whic If you create or use a modified version of this License (whic | |
7. DISCLAIMER OF WARRANTY. 7. DISCLAIMER OF WARRANTY. | |
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BAS COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BAS | |
8. TERMINATION. 8. TERMINATION. | |
This License and the rights granted hereunder will terminate This License and the rights granted hereunder will terminate | |
9. LIMITATION OF LIABILITY. 9. LIMITATION OF LIABILITY. | |
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TOR UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TOR | |
10. U.S. GOVERNMENT END USERS. 10. U.S. GOVERNMENT END USERS. | |
The Covered Code is a "commercial item," as that term is defi The Covered Code is a "commercial item," as that term is defi | |
11. MISCELLANEOUS. 11. MISCELLANEOUS. | |
This License represents the complete agreement concerning sub This License represents the complete agreement concerning sub | |
12. RESPONSIBILITY FOR CLAIMS. 12. RESPONSIBILITY FOR CLAIMS. | |
Except in cases where another Contributor has failed to compl Except in cases where another Contributor has failed to compl | |
EXHIBIT A. EXHIBIT A. | |
"The contents of this file are subject to the FreeImage Publi "The contents of this file are subject to the FreeImage Publi | |
Software distributed under the License is distributed on an " Software distributed under the License is distributed on an " | |
Little CMS (LCMS). Copyright (c) 1998-2007 Marti Maria Saguer Little CMS (LCMS). Copyright (c) 1998-2007 Marti Maria Saguer | |
Permission is hereby granted, free of charge, to any person o Permission is hereby granted, free of charge, to any person o | |
The above copyright notice and this permission notice shall b The above copyright notice and this permission notice shall b | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIN THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIN | |
paintlib (PICT source only). Copyright (c) 1996-2002 Ulrich v paintlib (PICT source only). Copyright (c) 1996-2002 Ulrich v | |
The paintlib source code is supplied "AS IS". Ulrich von Zado The paintlib source code is supplied "AS IS". Ulrich von Zado | |
Permission is hereby granted to use, copy, modify, and distri Permission is hereby granted to use, copy, modify, and distri | |
1. The origin of this source code must not be misrepresented. 1. The origin of this source code must not be misrepresented. | |
2. Altered versions must be plainly marked as such and must n 2. Altered versions must be plainly marked as such and must n | |
3. This Copyright notice may not be removed or altered from a 3. This Copyright notice may not be removed or altered from a | |
4. Executables containing paintlib or parts of it must state 4. Executables containing paintlib or parts of it must state | |
Ericsson Texture Compression Ericsson Texture Compression | |
SOFTWARE LICENSE AGREEMENT SOFTWARE LICENSE AGREEMENT | |
PLEASE REVIEW THE FOLLOWING TERMS AND CONDITIONS PRIOR TO USI PLEASE REVIEW THE FOLLOWING TERMS AND CONDITIONS PRIOR TO USI | |
Under the terms and conditions of the License Agreement, Lice Under the terms and conditions of the License Agreement, Lice | |
If Licensee institutes patent litigation against Ericsson or If Licensee institutes patent litigation against Ericsson or | |
The License Agreement does not transfer to Licensee any owner The License Agreement does not transfer to Licensee any owner | |
THE SOFTWARE IS PROVIDED "AS IS". ERICSSON MAKES NO REPRESENT THE SOFTWARE IS PROVIDED "AS IS". ERICSSON MAKES NO REPRESENT | |
IN NO EVENT WILL ERICSSON BE LIABLE TO THE LICENSEE FOR DAMAG IN NO EVENT WILL ERICSSON BE LIABLE TO THE LICENSEE FOR DAMAG | |
Licensee acknowledges that "ERICSSON ///" is the corporate tr Licensee acknowledges that "ERICSSON ///" is the corporate tr | |
The parties agree that this License Agreement based on these The parties agree that this License Agreement based on these | |
Particle Trimmer. 2009, Emil "Humus" Persson (www.humus.name) Particle Trimmer. 2009, Emil "Humus" Persson (www.humus.name) | |
This file is a part of the work done by Humus. This file is a part of the work done by Humus. | |
Recast / Detour. Copyright (C) 2009-2010 Mikko Mononen memon@ Recast / Detour. Copyright (C) 2009-2010 Mikko Mononen memon@ | |
This software is provided 'as-is', without any express or imp This software is provided 'as-is', without any express or imp | |
1. The origin of this software must not be misrepresented; yo 1. The origin of this software must not be misrepresented; yo | |
2. Altered source versions must be plainly marked as such, an 2. Altered source versions must be plainly marked as such, an | |
3. This notice may not be removed or altered from any source 3. This notice may not be removed or altered from any source | |
tlsf memory allocator implementation by Matthew Conte (matt@b tlsf memory allocator implementation by Matthew Conte (matt@b | |
Public Domain, no restrictions. Public Domain, no restrictions. | |
diff --side-by-side /Applications/Unity/Documentation/printable.html /Applications/Unity4.0/Documentation/printable.html | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN | |
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> <head> | |
<meta http-equiv="Content-Type" content="text/html; charset=u <meta http-equiv="Content-Type" content="text/html; charset=u | |
<title>Unity Manual (printable)</title> <title>Unity Manual (printable)</title> | |
<link rel="StyleSheet" href="Images/docs.css" type=" <link rel="StyleSheet" href="Images/docs.css" type=" | |
<style type="text/css"> <style type="text/css"> | |
.main hr { .main hr { | |
border: none; border: none; | |
margin-top: 1em; margin-top: 1em; | |
margin-bottom: 0.7em; margin-bottom: 0.7em; | |
border-top: 1px solid #000000; border-top: 1px solid #000000; | |
} } | |
.main h1 { .main h1 { | |
padding-bottom: 0.7em; padding-bottom: 0.7em; | |
} } | |
.codelisting { .codelisting { | |
border:1px solid black; border:1px solid black; | |
background-color:white; background-color:white; | |
} } | |
</style> </style> | |
</style> </style> | |
</head> </head> | |
<body> <body> | |
<div class="manual"> <div class="manual"> | |
<div class="main"> <div class="main"> | |
<hr><a name='Unity Manual'></a><h1>Unity Manual</h1> <hr><a name='Unity Manual'></a><h1>Unity Manual</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Welcome to Unity. <p>Welcome to Unity. | |
</p> </p> | |
<p class='vspace'>Unity is made to empower users to create th | <p class='vspace'>Unity is made to empower you to create the | |
</p> </p> | |
<p class='vspace'>The manual is divided into different sectio | <p class='vspace'>The manual is divided into different sectio | |
</p><div class='specific-ios' style='display: block;' id='spe </p><div class='specific-ios' style='display: block;' id='spe | |
<p>The <a href="Manual/iphone-GettingStarted.html">iOS Guide< <p>The <a href="Manual/iphone-GettingStarted.html">iOS Guide< | |
</p></div> </p></div> | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<p>The <a href="Manual/android-GettingStarted.html">Android G <p>The <a href="Manual/android-GettingStarted.html">Android G | |
</p></div> </p></div> | |
<p>The next section, <a href="Manual/FAQ.html">FAQ</a>, is a <p>The next section, <a href="Manual/FAQ.html">FAQ</a>, is a | |
</p> </p> | |
<p class='vspace'>The last section, <a href="Manual/Advanced. <p class='vspace'>The last section, <a href="Manual/Advanced. | |
</p> </p> | |
<p class='vspace'>When you're done reading, be sure to take a | <p class='vspace'>When you've finished reading, take a look a | |
</p> </p> | |
<p class='vspace'>If you find that any question you have is n | <p class='vspace'>If you find that any question you have is n | |
</p> </p> | |
<p class='vspace'>Happy reading, <br /><em>The Unity team</em <p class='vspace'>Happy reading, <br /><em>The Unity team</em | |
</p> </p> | |
<p class='vspace'>The Unity Manual Guide contains some sectio <p class='vspace'>The Unity Manual Guide contains some sectio | |
</p> </p> | |
<div class='vspace'></div><h2>Table of Contents</h2> <div class='vspace'></div><h2>Table of Contents</h2> | |
<ul><li class='toclink'><a href="Manual/UserGuide.html">User <ul><li class='toclink'><a href="Manual/UserGuide.html">User | |
<ul><li class='toclink'><a href="Manual/UnityBasics.html">Uni <ul><li class='toclink'><a href="Manual/UnityBasics.html">Uni | |
<ul><li class='toclink'><a href="Manual/LearningtheInterface. <ul><li class='toclink'><a href="Manual/LearningtheInterface. | |
</li><li class='toclink'><a href="Manual/CustomizingYourWorks </li><li class='toclink'><a href="Manual/CustomizingYourWorks | |
</li><li class='toclink'><a href="Manual/AssetWorkflow.html"> </li><li class='toclink'><a href="Manual/AssetWorkflow.html"> | |
</li><li class='toclink'><a href="Manual/CreatingScenes.html" </li><li class='toclink'><a href="Manual/CreatingScenes.html" | |
</li><li class='toclink'><a href="Manual/PublishingBuilds.htm </li><li class='toclink'><a href="Manual/PublishingBuilds.htm | |
</li><li class='toclink'><a href="Manual/Tutorials.html">Tuto </li><li class='toclink'><a href="Manual/Tutorials.html">Tuto | |
</li><li class='toclink'><a href="Manual/UnityHotkeys.html">U </li><li class='toclink'><a href="Manual/UnityHotkeys.html">U | |
</li><li class='toclink'><a href="Manual/Preferences.html">Pr </li><li class='toclink'><a href="Manual/Preferences.html">Pr | |
</li></ul></li><li class='toclink'><a href="Manual/BuildingSc </li></ul></li><li class='toclink'><a href="Manual/BuildingSc | |
<ul><li class='toclink'><a href="Manual/GameObjects.html">Gam <ul><li class='toclink'><a href="Manual/GameObjects.html">Gam | |
<ul><li class='toclink'><a href="Manual/TheGameObject-Compone <ul><li class='toclink'><a href="Manual/TheGameObject-Compone | |
</li></ul></li></ul></li></ul></li></ul><div class='specific- | </li></ul></li></ul></li></ul></li></ul> | |
<dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu | <div class='specific-u40' style='display: block;' id='specifi | |
> <dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu | |
</li></ul></dd></dl></dd></dl></dd></dl></div> </li></ul></dd></dl></dd></dl></dd></dl></div> | |
< | |
<dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu <dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu | |
</li></ul></dd></dl></dd></dl></dd></dl> | </li></ul></dd></dl></dd></dl></dd></dl><div class='specific- | |
> <dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu | |
> </li></ul></dd></dl></dd></dl></dd></dl></div> | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Using <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Using | |
</li></ul></dd></dl></dd></dl><div class='specific-u30' style | </li></ul></dd></dl></dd></dl> | |
<dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu | <div class='specific-u40' style='display: block;' id='specifi | |
> <dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu | |
</li></ul></dd></dl></dd></dl></dd></dl></div> </li></ul></dd></dl></dd></dl></dd></dl></div> | |
< | |
<dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu <dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu | |
</li><li class='toclink'><a href="Manual/Multi-ObjectEditing. </li><li class='toclink'><a href="Manual/Multi-ObjectEditing. | |
</li><li class='toclink'><a href="Manual/InspectorOptions.htm </li><li class='toclink'><a href="Manual/InspectorOptions.htm | |
</li></ul></dd></dl><ul><li class='toclink'><a href="Manual/U </li></ul></dd></dl><ul><li class='toclink'><a href="Manual/U | |
<ul><li class='toclink'><a href="Manual/SceneViewNavigation.h <ul><li class='toclink'><a href="Manual/SceneViewNavigation.h | |
</li><li class='toclink'><a href="Manual/PositioningGameObjec </li><li class='toclink'><a href="Manual/PositioningGameObjec | |
</li><li class='toclink'><a href="Manual/ViewModes.html">View </li><li class='toclink'><a href="Manual/ViewModes.html">View | |
</li><li class='toclink'><a href="Manual/GizmoandIconVisibili </li><li class='toclink'><a href="Manual/GizmoandIconVisibili | |
</li></ul></li><li class='toclink'><a href="Manual/Searching. </li></ul></li><li class='toclink'><a href="Manual/Searching. | |
</li><li class='toclink'><a href="Manual/Prefabs.html">Prefab </li><li class='toclink'><a href="Manual/Prefabs.html">Prefab | |
</li><li class='toclink'><a href="Manual/Lights.html">Lights< </li><li class='toclink'><a href="Manual/Lights.html">Lights< | |
</li><li class='toclink'><a href="Manual/Cameras.html">Camera </li><li class='toclink'><a href="Manual/Cameras.html">Camera | |
</li><li class='toclink'><a href="Manual/Terrains.html">Terra </li><li class='toclink'><a href="Manual/Terrains.html">Terra | |
</li></ul></dd></dl><ul><li class='toclink'><a href="Manual/A </li></ul></dd></dl><ul><li class='toclink'><a href="Manual/A | |
<ul><li class='toclink'><a href="Manual/ImportingAssets.html" <ul><li class='toclink'><a href="Manual/ImportingAssets.html" | |
</li><li class='toclink'><a href="Manual/Meshes.html">Meshes< </li><li class='toclink'><a href="Manual/Meshes.html">Meshes< | |
</li></ul></li></ul></dd></dl><div class='specific-u30' style | </li></ul></li></ul></dd></dl> | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Anima | <div class='specific-u40' style='display: block;' id='specifi | |
</li></ul></dd></dl></dd></dl></div> | <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Anima | |
| </li><li class='toclink'><a href="Manual/Splittinganimations. | |
> </li><li class='toclink'><a href="Manual/MecanimAnimationSyst | |
> <ul><li class='toclink'><a href="Manual/AvatarCreationandSetu | |
> <ul><li class='toclink'><a href="Manual/CreatingtheAvatar.htm | |
> </li><li class='toclink'><a href="Manual/ConfiguringtheAvatar | |
> </li><li class='toclink'><a href="Manual/MuscleDefinitions.ht | |
> </li><li class='toclink'><a href="Manual/AvatarBodyMask.html" | |
> </li></ul></li><li class='toclink'><a href="Manual/InverseKin | |
> </li><li class='toclink'><a href="Manual/AnimationStateMachin | |
> <ul><li class='toclink'><a href="Manual/AnimationStates.html" | |
> </li><li class='toclink'><a href="Manual/AnimationTransitions | |
> </li><li class='toclink'><a href="Manual/AnimationEvents.html | |
> </li></ul></li><li class='toclink'><a href="Manual/AnimationS | |
> </li><li class='toclink'><a href="Manual/AnimationBlendTrees. | |
> </li><li class='toclink'><a href="Manual/AnimationLayers.html | |
> </li><li class='toclink'><a href="Manual/ScriptingRootMotion. | |
> </li></ul></li></ul></dd></dl></dd></dl></div> | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Mater <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Mater | |
</li><li class='toclink'><a href="Manual/Textures.html">Textu </li><li class='toclink'><a href="Manual/Textures.html">Textu | |
</li><li class='toclink'><a href="Manual/ProceduralMaterials. </li><li class='toclink'><a href="Manual/ProceduralMaterials. | |
</li><li class='toclink'><a href="Manual/VideoFiles.html">Mov </li><li class='toclink'><a href="Manual/VideoFiles.html">Mov | |
</li><li class='toclink'><a href="Manual/AudioFiles.html">Aud </li><li class='toclink'><a href="Manual/AudioFiles.html">Aud | |
<ul><li class='toclink'><a href="Manual/TrackerModules.html"> <ul><li class='toclink'><a href="Manual/TrackerModules.html"> | |
</li></ul></li><li class='toclink'><a href="Manual/Scripting. </li></ul></li><li class='toclink'><a href="Manual/Scripting. | |
</li><li class='toclink'><a href="Manual/AssetStore.html">Ass </li><li class='toclink'><a href="Manual/AssetStore.html">Ass | |
</li><li class='toclink'><a href="Manual/AssetServer.html">As </li><li class='toclink'><a href="Manual/AssetServer.html">As | |
<ul><li class='toclink'><a href="Manual/AssetCacheServer.html <ul><li class='toclink'><a href="Manual/AssetCacheServer.html | |
</li><li class='toclink'><a href="Manual/CacheServerFAQ.html" </li><li class='toclink'><a href="Manual/CacheServerFAQ.html" | |
</li></ul></li><li class='toclink'><a href="Manual/BehindtheS </li></ul></li><li class='toclink'><a href="Manual/BehindtheS | |
</li></ul></dd></dl><ul><li class='toclink'><a href="Manual/C </li></ul></dd></dl><ul><li class='toclink'><a href="Manual/C | |
<ul><li class='toclink'><a href="Manual/InstantiatingPrefabs. <ul><li class='toclink'><a href="Manual/InstantiatingPrefabs. | |
</li><li class='toclink'><a href="Manual/Input.html">Input</a </li><li class='toclink'><a href="Manual/Input.html">Input</a | |
</li><li class='toclink'><a href="Manual/Transforms.html">Tra </li><li class='toclink'><a href="Manual/Transforms.html">Tra | |
</li><li class='toclink'><a href="Manual/Physics.html">Physic </li><li class='toclink'><a href="Manual/Physics.html">Physic | |
</li><li class='toclink'><a href="Manual/RandomNumbers.html"> </li><li class='toclink'><a href="Manual/RandomNumbers.html"> | |
</li><li class='toclink'><a href="Manual/ParticleSystems.html </li><li class='toclink'><a href="Manual/ParticleSystems.html | |
<ul><li class='toclink'><a href="Manual/ParticleSystemCurveEd <ul><li class='toclink'><a href="Manual/ParticleSystemCurveEd | |
</li><li class='toclink'><a href="Manual/ParticleSystemColorE </li><li class='toclink'><a href="Manual/ParticleSystemColorE | |
</li><li class='toclink'><a href="Manual/GradientEditor.html" </li><li class='toclink'><a href="Manual/GradientEditor.html" | |
</li><li class='toclink'><a href="Manual/ParticleSystemInspec </li><li class='toclink'><a href="Manual/ParticleSystemInspec | |
</li><li class='toclink'><a href="Manual/ParticleSystemModule </li><li class='toclink'><a href="Manual/ParticleSystemModule | |
</li></ul></li></ul></li></ul></dd></dl><div class='specific- | </li></ul></li></ul></li></ul></dd></dl> | |
<dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu | <div class='specific-u40' style='display: block;' id='specifi | |
> <dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu | |
</li></ul></dd></dl></dd></dl></dd></dl></div> </li></ul></dd></dl></dd></dl></dd></dl></div> | |
< | |
<dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu <dl><dd><dl><dd><dl><dd><ul><li class='toclink'><a href="Manu | |
</li></ul></dd></dl></dd></dl></dd></dl><div class='specific- | </li></ul></dd></dl></dd></dl></dd></dl> | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Anima | <div class='specific-u40' style='display: block;' id='specifi | |
</li><li class='toclink'><a href="Manual/AnimationScripting.h | <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Anima | |
> </li><li class='toclink'><a href="Manual/AnimationScripting40 | |
</li></ul></dd></dl></dd></dl></div> </li></ul></dd></dl></dd></dl></div> | |
< | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Navme <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Navme | |
<ul><li class='toclink'><a href="Manual/Navmeshbaking.html">N <ul><li class='toclink'><a href="Manual/Navmeshbaking.html">N | |
</li></ul></li><li class='toclink'><a href="Manual/Sound.html </li></ul></li><li class='toclink'><a href="Manual/Sound.html | |
</li><li class='toclink'><a href="Manual/GameInterfaceElement </li><li class='toclink'><a href="Manual/GameInterfaceElement | |
</li><li class='toclink'><a href="Manual/NetworkedMultiplayer </li><li class='toclink'><a href="Manual/NetworkedMultiplayer | |
</li></ul></dd></dl></dd></dl><div class='specific-ios' style </li></ul></dd></dl></dd></dl><div class='specific-ios' style | |
<ul><li class='toclink'><a href="Manual/iphone-GettingStarted <ul><li class='toclink'><a href="Manual/iphone-GettingStarted | |
<ul><li class='toclink'><a href="Manual/iphone-basic.html">Un <ul><li class='toclink'><a href="Manual/iphone-basic.html">Un | |
</li><li class='toclink'><a href="Manual/unity-remote.html">U </li><li class='toclink'><a href="Manual/unity-remote.html">U | |
</li><li class='toclink'><a href="Manual/iphone-API.html">iOS </li><li class='toclink'><a href="Manual/iphone-API.html">iOS | |
<ul><li class='toclink'><a href="Manual/Input.html#iPhoneInpu <ul><li class='toclink'><a href="Manual/Input.html#iPhoneInpu | |
</li><li class='toclink'><a href="Manual/MobileKeyboard.html" </li><li class='toclink'><a href="Manual/MobileKeyboard.html" | |
</li><li class='toclink'><a href="Manual/MobileAdvanced.html" </li><li class='toclink'><a href="Manual/MobileAdvanced.html" | |
</li><li class='toclink'><a href="Manual/MobileDotnet.html">U </li><li class='toclink'><a href="Manual/MobileDotnet.html">U | |
</li></ul></li><li class='toclink'><a href="Manual/iphone-Har </li></ul></li><li class='toclink'><a href="Manual/iphone-Har | |
</li><li class='toclink'><a href="Manual/iphone-performance.h </li><li class='toclink'><a href="Manual/iphone-performance.h | |
<ul><li class='toclink'><a href="Manual/iphone-iOS-Optimizati <ul><li class='toclink'><a href="Manual/iphone-iOS-Optimizati | |
</li><li class='toclink'><a href="Manual/iphone-InternalProfi </li><li class='toclink'><a href="Manual/iphone-InternalProfi | |
</li><li class='toclink'><a href="Manual/iphone-playerSizeOpt </li><li class='toclink'><a href="Manual/iphone-playerSizeOpt | |
</li></ul></li><li class='toclink'><a href="Manual/iphone-acc </li></ul></li><li class='toclink'><a href="Manual/iphone-acc | |
</li><li class='toclink'><a href="Manual/iphone-unsupported.h </li><li class='toclink'><a href="Manual/iphone-unsupported.h | |
</li><li class='toclink'><a href="Manual/PluginsForIOS.html"> </li><li class='toclink'><a href="Manual/PluginsForIOS.html"> | |
</li><li class='toclink'><a href="Manual/iphone-Downloadable- </li><li class='toclink'><a href="Manual/iphone-Downloadable- | |
</li><li class='toclink'><a href="Manual/MobileCustomizeSplas </li><li class='toclink'><a href="Manual/MobileCustomizeSplas | |
</li><li class='toclink'><a href="Manual/TroubleShooting.html </li><li class='toclink'><a href="Manual/TroubleShooting.html | |
</li><li class='toclink'><a href="Manual/iphone-bugreporting. </li><li class='toclink'><a href="Manual/iphone-bugreporting. | |
</li></ul></li></ul></div> </li></ul></li></ul></div> | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<ul><li class='toclink'><a href="Manual/android-GettingStarte <ul><li class='toclink'><a href="Manual/android-GettingStarte | |
<ul><li class='toclink'><a href="Manual/android-sdksetup.html <ul><li class='toclink'><a href="Manual/android-sdksetup.html | |
</li><li class='toclink'><a href="Manual/android-remote.html" </li><li class='toclink'><a href="Manual/android-remote.html" | |
</li><li class='toclink'><a href="Manual/TroubleShooting.html </li><li class='toclink'><a href="Manual/TroubleShooting.html | |
</li><li class='toclink'><a href="Manual/android-bugreporting </li><li class='toclink'><a href="Manual/android-bugreporting | |
</li><li class='toclink'><a href="Manual/android-unsupported. </li><li class='toclink'><a href="Manual/android-unsupported. | |
</li><li class='toclink'><a href="Components/class-PlayerSett </li><li class='toclink'><a href="Components/class-PlayerSett | |
</li><li class='toclink'><a href="Manual/android-API.html">An </li><li class='toclink'><a href="Manual/android-API.html">An | |
<ul><li class='toclink'><a href="Manual/Input.html#AndroidInp <ul><li class='toclink'><a href="Manual/Input.html#AndroidInp | |
</li><li class='toclink'><a href="Manual/MobileKeyboard.html# </li><li class='toclink'><a href="Manual/MobileKeyboard.html# | |
</li><li class='toclink'><a href="Manual/MobileAdvanced.html# </li><li class='toclink'><a href="Manual/MobileAdvanced.html# | |
</li><li class='toclink'><a href="Manual/MobileDotnet.html#An </li><li class='toclink'><a href="Manual/MobileDotnet.html#An | |
</li></ul></li><li class='toclink'><a href="Manual/PluginsFor </li></ul></li><li class='toclink'><a href="Manual/PluginsFor | |
</li><li class='toclink'><a href="Manual/MobileCustomizeSplas </li><li class='toclink'><a href="Manual/MobileCustomizeSplas | |
</li></ul></li></ul></div> </li></ul></li></ul></div> | |
<ul><li class='toclink'><a href="Manual/nacl-gettingstarted.h <ul><li class='toclink'><a href="Manual/nacl-gettingstarted.h | |
</li><li class='toclink'><a href="Manual/flash-gettingstarted </li><li class='toclink'><a href="Manual/flash-gettingstarted | |
<ul><li class='toclink'><a href="Manual/flash-setup.html">Fla <ul><li class='toclink'><a href="Manual/flash-setup.html">Fla | |
</li><li class='toclink'><a href="Manual/flash-building.html" </li><li class='toclink'><a href="Manual/flash-building.html" | |
</li><li class='toclink'><a href="Manual/flash-debugging.html </li><li class='toclink'><a href="Manual/flash-debugging.html | |
</li><li class='toclink'><a href="Manual/flash-whatssupported </li><li class='toclink'><a href="Manual/flash-whatssupported | |
</li><li class='toclink'><a href="Manual/flash-unitysharedswc </li><li class='toclink'><a href="Manual/flash-unitysharedswc | |
</li><li class='toclink'><a href="Manual/flashexamples-supply </li><li class='toclink'><a href="Manual/flashexamples-supply | |
</li><li class='toclink'><a href="Manual/flashexamples-callin </li><li class='toclink'><a href="Manual/flashexamples-callin | |
</li><li class='toclink'><a href="Manual/flashexamples-browse </li><li class='toclink'><a href="Manual/flashexamples-browse | |
</li><li class='toclink'><a href="Manual/flashexamples-access </li><li class='toclink'><a href="Manual/flashexamples-access | |
</li></ul></li><li class='toclink'><a href="Manual/FAQ.html"> </li></ul></li><li class='toclink'><a href="Manual/FAQ.html"> | |
<ul><li class='toclink'><a href="Manual/UpgradeGuide3435.html <ul><li class='toclink'><a href="Manual/UpgradeGuide3435.html | |
</li><li class='toclink'><a href="Manual/HowToUpgradeFrom2xTo </li><li class='toclink'><a href="Manual/HowToUpgradeFrom2xTo | |
<ul><li class='toclink'><a href="Manual/PhysicsUpgradeDetails <ul><li class='toclink'><a href="Manual/PhysicsUpgradeDetails | |
</li><li class='toclink'><a href="Manual/MonoUpgradeDetails.h </li><li class='toclink'><a href="Manual/MonoUpgradeDetails.h | |
</li><li class='toclink'><a href="Manual/RenderingUpgradeDeta </li><li class='toclink'><a href="Manual/RenderingUpgradeDeta | |
</li><li class='toclink'><a href="Manual/SL-V3Conversion.html </li><li class='toclink'><a href="Manual/SL-V3Conversion.html | |
</li></ul></li><li class='toclink'><a href="Manual/Activation </li></ul></li><li class='toclink'><a href="Manual/Activation | |
<ul><li class='toclink'><a href="Manual/ManualActivationHow-T <ul><li class='toclink'><a href="Manual/ManualActivationHow-T | |
</li><li class='toclink'><a href="Manual/InternetActivationHo </li><li class='toclink'><a href="Manual/InternetActivationHo | |
</li></ul></li><li class='toclink'><a href="Manual/GameCodeHo </li></ul></li><li class='toclink'><a href="Manual/GameCodeHo | |
<ul><li class='toclink'><a href="Manual/HOWTO-FirstPersonWalk <ul><li class='toclink'><a href="Manual/HOWTO-FirstPersonWalk | |
</li></ul></li><li class='toclink'><a href="Manual/Graphicsho </li></ul></li><li class='toclink'><a href="Manual/Graphicsho | |
<ul><li class='toclink'><a href="Manual/HOWTO-alphamaps.html" <ul><li class='toclink'><a href="Manual/HOWTO-alphamaps.html" | |
</li><li class='toclink'><a href="Manual/HOWTO-bumpmap.html"> </li><li class='toclink'><a href="Manual/HOWTO-bumpmap.html"> | |
</li><li class='toclink'><a href="Manual/HOWTO-UseDetailTextu </li><li class='toclink'><a href="Manual/HOWTO-UseDetailTextu | |
</li><li class='toclink'><a href="Manual/HOWTO-MakeCubemap.ht </li><li class='toclink'><a href="Manual/HOWTO-MakeCubemap.ht | |
</li><li class='toclink'><a href="Manual/HOWTO-UseSkybox.html </li><li class='toclink'><a href="Manual/HOWTO-UseSkybox.html | |
</li><li class='toclink'><a href="Manual/HOWTO-MeshParticleEm </li><li class='toclink'><a href="Manual/HOWTO-MeshParticleEm | |
</li><li class='toclink'><a href="Manual/HOWTO-SplashScreen.h </li><li class='toclink'><a href="Manual/HOWTO-SplashScreen.h | |
</li><li class='toclink'><a href="Manual/HOWTO-LightCookie.ht </li><li class='toclink'><a href="Manual/HOWTO-LightCookie.ht | |
</li><li class='toclink'><a href="Manual/HOWTO-FixZAxisIsUp.h </li><li class='toclink'><a href="Manual/HOWTO-FixZAxisIsUp.h | |
</li><li class='toclink'><a href="Manual/HOWTO-Water.html">Ho </li><li class='toclink'><a href="Manual/HOWTO-Water.html">Ho | |
</li></ul></li><li class='toclink'><a href="Manual/HOWTO-expo </li></ul></li><li class='toclink'><a href="Manual/HOWTO-expo | |
</li><li class='toclink'><a href="Manual/HOWTO-ArtAssetBestPr </li><li class='toclink'><a href="Manual/HOWTO-ArtAssetBestPr | |
</li><li class='toclink'><a href="Manual/HOWTO-importObject.h </li><li class='toclink'><a href="Manual/HOWTO-importObject.h | |
<ul><li class='toclink'><a href="Manual/HOWTO-ImportObjectMay <ul><li class='toclink'><a href="Manual/HOWTO-ImportObjectMay | |
</li><li class='toclink'><a href="Manual/HOWTO-ImportObjectCi </li><li class='toclink'><a href="Manual/HOWTO-ImportObjectCi | |
</li><li class='toclink'><a href="Manual/HOWTO-ImportObjectMa </li><li class='toclink'><a href="Manual/HOWTO-ImportObjectMa | |
</li><li class='toclink'><a href="Manual/HOWTO-ImportObjectCh </li><li class='toclink'><a href="Manual/HOWTO-ImportObjectCh | |
</li><li class='toclink'><a href="Manual/HOWTO-ImportObjectMo </li><li class='toclink'><a href="Manual/HOWTO-ImportObjectMo | |
</li><li class='toclink'><a href="Manual/HOWTO-importObjectLi </li><li class='toclink'><a href="Manual/HOWTO-importObjectLi | |
</li><li class='toclink'><a href="Manual/HOWTO-ImportObjectBl </li><li class='toclink'><a href="Manual/HOWTO-ImportObjectBl | |
</li></ul></li><li class='toclink'><a href="Manual/Workflow.h </li></ul></li><li class='toclink'><a href="Manual/Workflow.h | |
<ul><li class='toclink'><a href="Manual/HOWTO-MonoDevelop.htm <ul><li class='toclink'><a href="Manual/HOWTO-MonoDevelop.htm | |
</li><li class='toclink'><a href="Manual/HOWTO-exportpackage. </li><li class='toclink'><a href="Manual/HOWTO-exportpackage. | |
</li><li class='toclink'><a href="Manual/HOWTO-InstallStandar </li><li class='toclink'><a href="Manual/HOWTO-InstallStandar | |
</li><li class='toclink'><a href="Manual/HOWTO-PortingBetween </li><li class='toclink'><a href="Manual/HOWTO-PortingBetween | |
</li></ul></li></ul></li><li class='toclink'><a href="Manual/ </li></ul></li></ul></li><li class='toclink'><a href="Manual/ | |
<ul><li class='toclink'><a href="Manual/VectorCookbook.html"> <ul><li class='toclink'><a href="Manual/VectorCookbook.html"> | |
<ul><li class='toclink'><a href="Manual/UnderstandingVectorAr <ul><li class='toclink'><a href="Manual/UnderstandingVectorAr | |
</li><li class='toclink'><a href="Manual/DirectionDistanceFro </li><li class='toclink'><a href="Manual/DirectionDistanceFro | |
</li><li class='toclink'><a href="Manual/ComputingNormalPerpe </li><li class='toclink'><a href="Manual/ComputingNormalPerpe | |
</li><li class='toclink'><a href="Manual/AmountVectorMagnitud </li><li class='toclink'><a href="Manual/AmountVectorMagnitud | |
</li></ul></li><li class='toclink'><a href="Manual/AssetBundl </li></ul></li><li class='toclink'><a href="Manual/AssetBundl | |
<ul><li class='toclink'><a href="Manual/abfaq.html">AssetBund <ul><li class='toclink'><a href="Manual/abfaq.html">AssetBund | |
</li><li class='toclink'><a href="Manual/BuildingAssetBundles </li><li class='toclink'><a href="Manual/BuildingAssetBundles | |
</li><li class='toclink'><a href="Manual/DownloadingAssetBund </li><li class='toclink'><a href="Manual/DownloadingAssetBund | |
</li><li class='toclink'><a href="Manual/LoadingAssetBundles. </li><li class='toclink'><a href="Manual/LoadingAssetBundles. | |
</li><li class='toclink'><a href="Manual/keepingtrackofloaded </li><li class='toclink'><a href="Manual/keepingtrackofloaded | |
</li><li class='toclink'><a href="Manual/binarydata.html">Sto </li><li class='toclink'><a href="Manual/binarydata.html">Sto | |
</li><li class='toclink'><a href="Manual/protectingcontent.ht </li><li class='toclink'><a href="Manual/protectingcontent.ht | |
</li><li class='toclink'><a href="Manual/managingassetdepende </li><li class='toclink'><a href="Manual/managingassetdepende | |
</li><li class='toclink'><a href="Manual/scriptsinassetbundle </li><li class='toclink'><a href="Manual/scriptsinassetbundle | |
</li></ul></li><li class='toclink'><a href="Manual/AssetDatab </li></ul></li><li class='toclink'><a href="Manual/AssetDatab | |
</li><li class='toclink'><a href="Manual/BuildPlayerPipeline. </li><li class='toclink'><a href="Manual/BuildPlayerPipeline. | |
</li><li class='toclink'><a href="Manual/RenderingPaths.html" </li><li class='toclink'><a href="Manual/RenderingPaths.html" | |
</li><li class='toclink'><a href="Manual/Profiler.html">Profi </li><li class='toclink'><a href="Manual/Profiler.html">Profi | |
</li><li class='toclink'><a href="Manual/Lightmapping.html">L </li><li class='toclink'><a href="Manual/Lightmapping.html">L | |
<ul><li class='toclink'><a href="Manual/LightmappingInDepth.h <ul><li class='toclink'><a href="Manual/LightmappingInDepth.h | |
</li><li class='toclink'><a href="Manual/LightmappingCustomSe </li><li class='toclink'><a href="Manual/LightmappingCustomSe | |
</li><li class='toclink'><a href="Manual/LightmappingUV.html" </li><li class='toclink'><a href="Manual/LightmappingUV.html" | |
</li><li class='toclink'><a href="Manual/LightProbes.html">Li </li><li class='toclink'><a href="Manual/LightProbes.html">Li | |
</li></ul></li><li class='toclink'><a href="Manual/HDR.html"> </li></ul></li><li class='toclink'><a href="Manual/HDR.html"> | |
</li><li class='toclink'><a href="Manual/LinearLighting.html" </li><li class='toclink'><a href="Manual/LinearLighting.html" | |
</li><li class='toclink'><a href="Manual/OcclusionCulling.htm </li><li class='toclink'><a href="Manual/OcclusionCulling.htm | |
</li><li class='toclink'><a href="Manual/LevelOfDetail.html"> </li><li class='toclink'><a href="Manual/LevelOfDetail.html"> | |
</li><li class='toclink'><a href="Manual/CameraTricks.html">C </li><li class='toclink'><a href="Manual/CameraTricks.html">C | |
<ul><li class='toclink'><a href="Manual/UnderstandingFrustum. <ul><li class='toclink'><a href="Manual/UnderstandingFrustum. | |
</li><li class='toclink'><a href="Manual/FrustumSizeAtDistanc </li><li class='toclink'><a href="Manual/FrustumSizeAtDistanc | |
</li><li class='toclink'><a href="Manual/DollyZoom.html">Doll </li><li class='toclink'><a href="Manual/DollyZoom.html">Doll | |
</li><li class='toclink'><a href="Manual/CameraRays.html">Ray </li><li class='toclink'><a href="Manual/CameraRays.html">Ray | |
</li><li class='toclink'><a href="Manual/ObliqueFrustum.html" </li><li class='toclink'><a href="Manual/ObliqueFrustum.html" | |
</li><li class='toclink'><a href="Manual/ImpressionOfSize.htm </li><li class='toclink'><a href="Manual/ImpressionOfSize.htm | |
</li></ul></li><li class='toclink'><a href="Manual/LoadingRes </li></ul></li><li class='toclink'><a href="Manual/LoadingRes | |
</li><li class='toclink'><a href="Manual/ModifyingSourceAsset </li><li class='toclink'><a href="Manual/ModifyingSourceAsset | |
</li><li class='toclink'><a href="Manual/GeneratingMeshGeomet </li><li class='toclink'><a href="Manual/GeneratingMeshGeomet | |
<ul><li class='toclink'><a href="Manual/AnatomyofaMesh.html"> <ul><li class='toclink'><a href="Manual/AnatomyofaMesh.html"> | |
</li><li class='toclink'><a href="Manual/UsingtheMeshClass.ht </li><li class='toclink'><a href="Manual/UsingtheMeshClass.ht | |
</li><li class='toclink'><a href="Manual/Example-CreatingaBil </li><li class='toclink'><a href="Manual/Example-CreatingaBil | |
</li></ul></li></ul></li></ul> | </li></ul></li></ul></li></ul><div class='specific-u40' style | |
> <dl><dd><ul><li class='toclink'><a href="Manual/StyledText.ht | |
> </li></ul></dd></dl></div> | |
<dl><dd><ul><li class='toclink'><a href="Manual/UsingDLL.html <dl><dd><ul><li class='toclink'><a href="Manual/UsingDLL.html | |
</li><li class='toclink'><a href="Manual/ExecutionOrder.html" </li><li class='toclink'><a href="Manual/ExecutionOrder.html" | |
</li><li class='toclink'><a href="Manual/OptimizingGraphicsPe </li><li class='toclink'><a href="Manual/OptimizingGraphicsPe | |
<ul><li class='toclink'><a href="Manual/DrawCallBatching.html <ul><li class='toclink'><a href="Manual/DrawCallBatching.html | |
</li><li class='toclink'><a href="Manual/ModelingOptimizedCha </li><li class='toclink'><a href="Manual/ModelingOptimizedCha | |
</li><li class='toclink'><a href="Manual/RenderingStatistics. </li><li class='toclink'><a href="Manual/RenderingStatistics. | |
</li></ul></li><li class='toclink'><a href="Manual/ReducingFi </li></ul></li><li class='toclink'><a href="Manual/ReducingFi | |
</li><li class='toclink'><a href="Manual/UnderstandingAutomat </li><li class='toclink'><a href="Manual/UnderstandingAutomat | |
</li><li class='toclink'><a href="Manual/PlatformDependentCom </li><li class='toclink'><a href="Manual/PlatformDependentCom | |
</li><li class='toclink'><a href="Manual/GenericFunctions.htm </li><li class='toclink'><a href="Manual/GenericFunctions.htm | |
</li><li class='toclink'><a href="Manual/Debugging.html">Debu </li><li class='toclink'><a href="Manual/Debugging.html">Debu | |
<ul><li class='toclink'><a href="Manual/Console.html">Console <ul><li class='toclink'><a href="Manual/Console.html">Console | |
</li><li class='toclink'><a href="Manual/Debugger.html">Debug </li><li class='toclink'><a href="Manual/Debugger.html">Debug | |
</li><li class='toclink'><a href="Manual/LogFiles.html">Log F </li><li class='toclink'><a href="Manual/LogFiles.html">Log F | |
<ul><li class='toclink'><a href="Manual/AccessingHiddenFolder <ul><li class='toclink'><a href="Manual/AccessingHiddenFolder | |
</li></ul></li></ul></li><li class='toclink'><a href="Manual/ </li></ul></li></ul></li><li class='toclink'><a href="Manual/ | |
<ul><li class='toclink'><a href="Manual/PluginsForDesktop.htm <ul><li class='toclink'><a href="Manual/PluginsForDesktop.htm | |
</li><li class='toclink'><a href="Manual/PluginsForIOS.html"> </li><li class='toclink'><a href="Manual/PluginsForIOS.html"> | |
</li><li class='toclink'><a href="Manual/PluginsForAndroid.ht </li><li class='toclink'><a href="Manual/PluginsForAndroid.ht | |
</li><li class='toclink'><a href="Manual/NativePluginInterfac </li><li class='toclink'><a href="Manual/NativePluginInterfac | |
</li></ul></li><li class='toclink'><a href="Manual/TextualSce </li></ul></li><li class='toclink'><a href="Manual/TextualSce | |
<ul><li class='toclink'><a href="Manual/FormatDescription.htm <ul><li class='toclink'><a href="Manual/FormatDescription.htm | |
</li><li class='toclink'><a href="Manual/YAMLSceneExample.htm </li><li class='toclink'><a href="Manual/YAMLSceneExample.htm | |
</li><li class='toclink'><a href="Manual/ClassIDReference.htm </li><li class='toclink'><a href="Manual/ClassIDReference.htm | |
</li></ul></li><li class='toclink'><a href="Manual/StreamingA </li></ul></li><li class='toclink'><a href="Manual/StreamingA | |
</li><li class='toclink'><a href="Manual/CommandLineArguments </li><li class='toclink'><a href="Manual/CommandLineArguments | |
</li><li class='toclink'><a href="Manual/RunningEditorCodeOnL </li><li class='toclink'><a href="Manual/RunningEditorCodeOnL | |
</li><li class='toclink'><a href="Manual/Shaders.html">Shader </li><li class='toclink'><a href="Manual/Shaders.html">Shader | |
<ul><li class='toclink'><a href="Manual/ShaderTut1.html">Shad <ul><li class='toclink'><a href="Manual/ShaderTut1.html">Shad | |
</li><li class='toclink'><a href="Manual/ShaderTut2.html">Sha </li><li class='toclink'><a href="Manual/ShaderTut2.html">Sha | |
</li></ul></li><li class='toclink'><a href="Manual/GraphicsEm | </li></ul></li></ul></dd></dl><div class='specific-u40' style | |
> <dl><dd><ul><li class='toclink'><a href="Manual/ComputeShader | |
> </li></ul></dd></dl></div> | |
> <dl><dd><ul><li class='toclink'><a href="Manual/GraphicsEmula | |
</li><li class='toclink'><a href="Manual/NetworkEmulation.htm </li><li class='toclink'><a href="Manual/NetworkEmulation.htm | |
</li><li class='toclink'><a href="Manual/SecuritySandbox.html </li><li class='toclink'><a href="Manual/SecuritySandbox.html | |
</li><li class='toclink'><a class='urllink' href='ScriptRefer </li><li class='toclink'><a class='urllink' href='ScriptRefer | |
</li><li class='toclink'><a href="Manual/VisualStudioIntegrat </li><li class='toclink'><a href="Manual/VisualStudioIntegrat | |
</li><li class='toclink'><a href="Manual/ExternalVersionContr </li><li class='toclink'><a href="Manual/ExternalVersionContr | |
</li><li class='toclink'><a href="Manual/Analytics.html">Anal </li><li class='toclink'><a href="Manual/Analytics.html">Anal | |
</li><li class='toclink'><a href="Manual/VersionCheck.html">C </li><li class='toclink'><a href="Manual/VersionCheck.html">C | |
</li><li class='toclink'><a href="Manual/TroubleShooting.html </li><li class='toclink'><a href="Manual/TroubleShooting.html | |
</li></ul></dd></dl><div class='specific-desktop' style='disp </li></ul></dd></dl><div class='specific-desktop' style='disp | |
<dl><dd><ul><li class='toclink'><a href="Manual/IMEInput.html <dl><dd><ul><li class='toclink'><a href="Manual/IMEInput.html | |
</li><li class='toclink'><a href="Manual/Shadows.html">Shadow | </li></ul></dd></dl></div> | |
> <dl><dd><ul><li class='toclink'><a href="Manual/Shadows.html" | |
<ul><li class='toclink'><a href="Manual/DirectionalShadowDeta <ul><li class='toclink'><a href="Manual/DirectionalShadowDeta | |
</li><li class='toclink'><a href="Manual/ShadowTroubleshootin </li><li class='toclink'><a href="Manual/ShadowTroubleshootin | |
</li><li class='toclink'><a href="Manual/ShadowSizeDetails.ht </li><li class='toclink'><a href="Manual/ShadowSizeDetails.ht | |
</li><li class='toclink'><a href="Manual/OptimizeForIntegrate | </li></ul></li></ul></dd></dl><div class='specific-desktop' s | |
</li></ul></li><li class='toclink'><a href="Manual/WebPlayerD | <dl><dd><ul><li class='toclink'><a href="Manual/OptimizeForIn | |
> </li><li class='toclink'><a href="Manual/WebPlayerDeployment. | |
<ul><li class='toclink'><a href="Manual/HTMLcodetoloadUnityWe <ul><li class='toclink'><a href="Manual/HTMLcodetoloadUnityWe | |
</li><li class='toclink'><a href="Manual/WorkingwithUnityObje </li><li class='toclink'><a href="Manual/WorkingwithUnityObje | |
</li><li class='toclink'><a href="Manual/CustomizingtheUnityW </li><li class='toclink'><a href="Manual/CustomizingtheUnityW | |
</li><li class='toclink'><a href="Manual/WebPlayerBehaviorTag </li><li class='toclink'><a href="Manual/WebPlayerBehaviorTag | |
</li><li class='toclink'><a href="Manual/UnityWebPlayerandbro </li><li class='toclink'><a href="Manual/UnityWebPlayerandbro | |
</li><li class='toclink'><a href="Manual/UsingWebPlayertempla </li><li class='toclink'><a href="Manual/UsingWebPlayertempla | |
</li><li class='toclink'><a href="Manual/WebPlayerStreaming.h </li><li class='toclink'><a href="Manual/WebPlayerStreaming.h | |
</li></ul></li></ul></dd></dl></div> </li></ul></li></ul></dd></dl></div> | |
</p><small>Page last updated: 2012-07-25</p> | </p><small>Page last updated: 2012-08-13</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='User Guide'></a><h1>User Guide</h1> <hr><a name='User Guide'></a><h1>User Guide</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>This section of the Manual is focused on the features and <p>This section of the Manual is focused on the features and | |
</p> </p> | |
<p class='vspace'>We recommend that new users begin by readin <p class='vspace'>We recommend that new users begin by readin | |
</p> </p> | |
<div class='vspace'></div><ul><li class='toclink'><a href="Ma <div class='vspace'></div><ul><li class='toclink'><a href="Ma | |
<ul><li class='toclink'><a href="Manual/LearningtheInterface. <ul><li class='toclink'><a href="Manual/LearningtheInterface. | |
</li><li class='toclink'><a href="Manual/CustomizingYourWorks </li><li class='toclink'><a href="Manual/CustomizingYourWorks | |
</li><li class='toclink'><a href="Manual/AssetWorkflow.html"> </li><li class='toclink'><a href="Manual/AssetWorkflow.html"> | |
</li><li class='toclink'><a href="Manual/CreatingScenes.html" </li><li class='toclink'><a href="Manual/CreatingScenes.html" | |
</li><li class='toclink'><a href="Manual/PublishingBuilds.htm </li><li class='toclink'><a href="Manual/PublishingBuilds.htm | |
</li><li class='toclink'><a href="Manual/Tutorials.html">Tuto </li><li class='toclink'><a href="Manual/Tutorials.html">Tuto | |
</li><li class='toclink'><a href="Manual/UnityHotkeys.html">U </li><li class='toclink'><a href="Manual/UnityHotkeys.html">U | |
</li><li class='toclink'><a href="Manual/Preferences.html">Pr </li><li class='toclink'><a href="Manual/Preferences.html">Pr | |
</li></ul></li><li class='toclink'><a href="Manual/BuildingSc </li></ul></li><li class='toclink'><a href="Manual/BuildingSc | |
<ul><li class='toclink'><a href="Manual/GameObjects.html">Gam <ul><li class='toclink'><a href="Manual/GameObjects.html">Gam | |
<ul><li class='toclink'><a href="Manual/TheGameObject-Compone <ul><li class='toclink'><a href="Manual/TheGameObject-Compone | |
</li></ul></li></ul></li></ul><div class='specific-u30' style | </li></ul></li></ul></li></ul> | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Using | <div class='specific-u40' style='display: block;' id='specifi | |
> <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Using | |
</li></ul></dd></dl></dd></dl></div> </li></ul></dd></dl></dd></dl></div> | |
< | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/TheCo <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/TheCo | |
</li></ul></dd></dl></dd></dl> | </li></ul></dd></dl></dd></dl><div class='specific-u40' style | |
> <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Deact | |
> </li></ul></dd></dl></dd></dl></div> | |
<dl><dd><ul><li class='toclink'><a href="Manual/UsingTheInspe <dl><dd><ul><li class='toclink'><a href="Manual/UsingTheInspe | |
</li></ul></dd></dl><div class='specific-u30' style='display: | </li></ul></dd></dl> | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Editi | <div class='specific-u40' style='display: block;' id='specifi | |
> <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Editi | |
</li></ul></dd></dl></dd></dl></div> </li></ul></dd></dl></dd></dl></div> | |
< | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Editi <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Editi | |
</li><li class='toclink'><a href="Manual/Multi-ObjectEditing. </li><li class='toclink'><a href="Manual/Multi-ObjectEditing. | |
</li><li class='toclink'><a href="Manual/InspectorOptions.htm </li><li class='toclink'><a href="Manual/InspectorOptions.htm | |
</li></ul></dd></dl><ul><li class='toclink'><a href="Manual/U </li></ul></dd></dl><ul><li class='toclink'><a href="Manual/U | |
<ul><li class='toclink'><a href="Manual/SceneViewNavigation.h <ul><li class='toclink'><a href="Manual/SceneViewNavigation.h | |
</li><li class='toclink'><a href="Manual/PositioningGameObjec </li><li class='toclink'><a href="Manual/PositioningGameObjec | |
</li><li class='toclink'><a href="Manual/ViewModes.html">View </li><li class='toclink'><a href="Manual/ViewModes.html">View | |
</li><li class='toclink'><a href="Manual/GizmoandIconVisibili </li><li class='toclink'><a href="Manual/GizmoandIconVisibili | |
</li></ul></li><li class='toclink'><a href="Manual/Searching. </li></ul></li><li class='toclink'><a href="Manual/Searching. | |
</li><li class='toclink'><a href="Manual/Prefabs.html">Prefab </li><li class='toclink'><a href="Manual/Prefabs.html">Prefab | |
</li><li class='toclink'><a href="Manual/Lights.html">Lights< </li><li class='toclink'><a href="Manual/Lights.html">Lights< | |
</li><li class='toclink'><a href="Manual/Cameras.html">Camera </li><li class='toclink'><a href="Manual/Cameras.html">Camera | |
</li><li class='toclink'><a href="Manual/Terrains.html">Terra </li><li class='toclink'><a href="Manual/Terrains.html">Terra | |
</li></ul></dd></dl><ul><li class='toclink'><a href="Manual/A </li></ul></dd></dl><ul><li class='toclink'><a href="Manual/A | |
<ul><li class='toclink'><a href="Manual/ImportingAssets.html" <ul><li class='toclink'><a href="Manual/ImportingAssets.html" | |
</li><li class='toclink'><a href="Manual/Meshes.html">Meshes< </li><li class='toclink'><a href="Manual/Meshes.html">Meshes< | |
</li></ul></li></ul><div class='specific-u30' style='display: | </li></ul></li></ul> | |
<dl><dd><ul><li class='toclink'><a href="Manual/Animations.ht | <div class='specific-u40' style='display: block;' id='specifi | |
</li></ul></dd></dl></div> | <dl><dd><ul><li class='toclink'><a href="Manual/Animations40. | |
| </li><li class='toclink'><a href="Manual/Splittinganimations. | |
> </li><li class='toclink'><a href="Manual/MecanimAnimationSyst | |
> <ul><li class='toclink'><a href="Manual/AvatarCreationandSetu | |
> <ul><li class='toclink'><a href="Manual/CreatingtheAvatar.htm | |
> </li><li class='toclink'><a href="Manual/ConfiguringtheAvatar | |
> </li><li class='toclink'><a href="Manual/MuscleDefinitions.ht | |
> </li><li class='toclink'><a href="Manual/AvatarBodyMask.html" | |
> </li></ul></li><li class='toclink'><a href="Manual/InverseKin | |
> </li><li class='toclink'><a href="Manual/AnimationStateMachin | |
> <ul><li class='toclink'><a href="Manual/AnimationStates.html" | |
> </li><li class='toclink'><a href="Manual/AnimationTransitions | |
> </li><li class='toclink'><a href="Manual/AnimationEvents.html | |
> </li></ul></li><li class='toclink'><a href="Manual/AnimationS | |
> </li><li class='toclink'><a href="Manual/AnimationBlendTrees. | |
> </li><li class='toclink'><a href="Manual/AnimationLayers.html | |
> </li><li class='toclink'><a href="Manual/ScriptingRootMotion. | |
> </li></ul></li></ul></dd></dl></div> | |
<dl><dd><ul><li class='toclink'><a href="Manual/Materials.htm <dl><dd><ul><li class='toclink'><a href="Manual/Materials.htm | |
</li><li class='toclink'><a href="Manual/Textures.html">Textu </li><li class='toclink'><a href="Manual/Textures.html">Textu | |
</li><li class='toclink'><a href="Manual/ProceduralMaterials. </li><li class='toclink'><a href="Manual/ProceduralMaterials. | |
</li><li class='toclink'><a href="Manual/VideoFiles.html">Mov </li><li class='toclink'><a href="Manual/VideoFiles.html">Mov | |
</li><li class='toclink'><a href="Manual/AudioFiles.html">Aud </li><li class='toclink'><a href="Manual/AudioFiles.html">Aud | |
<ul><li class='toclink'><a href="Manual/TrackerModules.html"> <ul><li class='toclink'><a href="Manual/TrackerModules.html"> | |
</li></ul></li><li class='toclink'><a href="Manual/Scripting. </li></ul></li><li class='toclink'><a href="Manual/Scripting. | |
</li><li class='toclink'><a href="Manual/AssetStore.html">Ass </li><li class='toclink'><a href="Manual/AssetStore.html">Ass | |
</li><li class='toclink'><a href="Manual/AssetServer.html">As </li><li class='toclink'><a href="Manual/AssetServer.html">As | |
<ul><li class='toclink'><a href="Manual/AssetCacheServer.html <ul><li class='toclink'><a href="Manual/AssetCacheServer.html | |
</li><li class='toclink'><a href="Manual/CacheServerFAQ.html" </li><li class='toclink'><a href="Manual/CacheServerFAQ.html" | |
</li></ul></li><li class='toclink'><a href="Manual/BehindtheS </li></ul></li><li class='toclink'><a href="Manual/BehindtheS | |
</li></ul></dd></dl><ul><li class='toclink'><a href="Manual/C </li></ul></dd></dl><ul><li class='toclink'><a href="Manual/C | |
<ul><li class='toclink'><a href="Manual/InstantiatingPrefabs. <ul><li class='toclink'><a href="Manual/InstantiatingPrefabs. | |
</li><li class='toclink'><a href="Manual/Input.html">Input</a </li><li class='toclink'><a href="Manual/Input.html">Input</a | |
</li><li class='toclink'><a href="Manual/Transforms.html">Tra </li><li class='toclink'><a href="Manual/Transforms.html">Tra | |
</li><li class='toclink'><a href="Manual/Physics.html">Physic </li><li class='toclink'><a href="Manual/Physics.html">Physic | |
</li><li class='toclink'><a href="Manual/RandomNumbers.html"> </li><li class='toclink'><a href="Manual/RandomNumbers.html"> | |
</li><li class='toclink'><a href="Manual/ParticleSystems.html </li><li class='toclink'><a href="Manual/ParticleSystems.html | |
<ul><li class='toclink'><a href="Manual/ParticleSystemCurveEd <ul><li class='toclink'><a href="Manual/ParticleSystemCurveEd | |
</li><li class='toclink'><a href="Manual/ParticleSystemColorE </li><li class='toclink'><a href="Manual/ParticleSystemColorE | |
</li><li class='toclink'><a href="Manual/GradientEditor.html" </li><li class='toclink'><a href="Manual/GradientEditor.html" | |
</li><li class='toclink'><a href="Manual/ParticleSystemInspec </li><li class='toclink'><a href="Manual/ParticleSystemInspec | |
</li><li class='toclink'><a href="Manual/ParticleSystemModule </li><li class='toclink'><a href="Manual/ParticleSystemModule | |
</li></ul></li></ul></li></ul><div class='specific-u30' style | </li></ul></li></ul></li></ul> | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Parti | <div class='specific-u40' style='display: block;' id='specifi | |
> <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Parti | |
</li></ul></dd></dl></dd></dl></div> </li></ul></dd></dl></dd></dl></div> | |
< | |
<dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Parti <dl><dd><dl><dd><ul><li class='toclink'><a href="Manual/Parti | |
</li></ul></dd></dl></dd></dl><div class='specific-u30' style | </li></ul></dd></dl></dd></dl> | |
<dl><dd><ul><li class='toclink'><a href="Manual/Animation.htm | <div class='specific-u40' style='display: block;' id='specifi | |
</li><li class='toclink'><a href="Manual/AnimationScripting.h | <dl><dd><ul><li class='toclink'><a href="Manual/AnimationEdit | |
> </li><li class='toclink'><a href="Manual/AnimationScripting40 | |
</li></ul></dd></dl></div> </li></ul></dd></dl></div> | |
< | |
<dl><dd><ul><li class='toclink'><a href="Manual/NavmeshandPat <dl><dd><ul><li class='toclink'><a href="Manual/NavmeshandPat | |
<ul><li class='toclink'><a href="Manual/Navmeshbaking.html">N <ul><li class='toclink'><a href="Manual/Navmeshbaking.html">N | |
</li></ul></li><li class='toclink'><a href="Manual/Sound.html </li></ul></li><li class='toclink'><a href="Manual/Sound.html | |
</li><li class='toclink'><a href="Manual/GameInterfaceElement </li><li class='toclink'><a href="Manual/GameInterfaceElement | |
</li><li class='toclink'><a href="Manual/NetworkedMultiplayer </li><li class='toclink'><a href="Manual/NetworkedMultiplayer | |
</li></ul></dd></dl><div class='specific-ios' style='display: </li></ul></dd></dl><div class='specific-ios' style='display: | |
</div> </div> | |
</p><small>Page last updated: 2010-09-09</p> | </p><small>Page last updated: 2010-09-09</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Unity Basics'></a><h1>Unity Basics</h1> <hr><a name='Unity Basics'></a><h1>Unity Basics</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>This section is your key to getting started with Unity. I <p>This section is your key to getting started with Unity. I | |
</p> </p> | |
<p class='vspace'>When you are finished reading this section, <p class='vspace'>When you are finished reading this section, | |
</p> </p> | |
<div class='vspace'></div> <div class='vspace'></div> | |
<table> <table> | |
<tr> <tr> | |
<td width="50%"> <td width="50%"> | |
<table border='0' cellpadding='2' cellspacing='2' bordercolor <table border='0' cellpadding='2' cellspacing='2' bordercolor | |
<tr ><td ><a href="Manual/LearningtheInterface.html"><img cla <tr ><td ><a href="Manual/LearningtheInterface.html"><img cla | |
<tr ><td > </td><td align='left'><a href="Manual/AssetW <tr ><td > </td><td align='left'><a href="Manual/AssetW | |
<tr ><td ><a href="Manual/AssetWorkflow.html"><img class='fig <tr ><td ><a href="Manual/AssetWorkflow.html"><img class='fig | |
<tr ><td > </td><td align='left'><a href="Manual/Creati <tr ><td > </td><td align='left'><a href="Manual/Creati | |
<tr ><td align='left'><a href="Manual/CreatingScenes.html">< <tr ><td align='left'><a href="Manual/CreatingScenes.html">< | |
</table> </table> | |
<div class='vspace'></div> <div class='vspace'></div> | |
</td><td width="20"> </td><td width="20"> | |
</td><td width="50%"> </td><td width="50%"> | |
<div class='vspace'></div><table border='0' cellpadding='2' c <div class='vspace'></div><table border='0' cellpadding='2' c | |
<tr ><td align='left'><a href="Manual/PublishingBuilds.html" <tr ><td align='left'><a href="Manual/PublishingBuilds.html" | |
<tr ><td > </td><td align='left'><a class='urllink' hre <tr ><td > </td><td align='left'><a class='urllink' hre | |
<tr ><td align='left'><a class='urllink' href='http://unity3 <tr ><td align='left'><a class='urllink' href='http://unity3 | |
</table> </table> | |
<div class='vspace'></div> <div class='vspace'></div> | |
</tr></table> </tr></table> | |
</p><small>Page last updated: 2010-09-10</p> | </p><small>Page last updated: 2010-09-10</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Learning the Interface'></a><h1>Learning the Int <hr><a name='Learning the Interface'></a><h1>Learning the Int | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<h2>First Launch</h2> <h2>First Launch</h2> | |
<p>Let's begin learning Unity. If you have not yet opened Un <p>Let's begin learning Unity. If you have not yet opened Un | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Project View</h2> <div class='vspace'></div><h2>Project View</h2> | |
<div><img class='figure' src='Images/manual/LearningtheInterf <div><img class='figure' src='Images/manual/LearningtheInterf | |
<p class='vspace'>Every Unity project contains an <span class <p class='vspace'>Every Unity project contains an <span class | |
</p> </p> | |
<p class='vspace'><b>Important Note:</b> You should <b>never< <p class='vspace'><b>Important Note:</b> You should <b>never< | |
</p> </p> | |
<p class='vspace'>To add assets to your project, you can drag <p class='vspace'>To add assets to your project, you can drag | |
</p> </p> | |
<p class='vspace'><span class='doc-keyword'>Scenes</span> are <p class='vspace'><span class='doc-keyword'>Scenes</span> are | |
</p> </p> | |
<p class='vspace'>Some game assets need to be created from wi <p class='vspace'>Some game assets need to be created from wi | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>This will allow you to add scripts, Prefabs <p class='vspace'>This will allow you to add scripts, Prefabs | |
</p> </p> | |
<div class='vspace'></div><h2>Hierarchy</h2> <div class='vspace'></div><h2>Hierarchy</h2> | |
<div><img class='figure' src='Images/manual/LearningtheInterf <div><img class='figure' src='Images/manual/LearningtheInterf | |
<p>The <span class='doc-keyword'>Hierarchy</span> contains ev <p>The <span class='doc-keyword'>Hierarchy</span> contains ev | |
</p> </p> | |
<div class='vspace'></div><h3>Parenting</h3> <div class='vspace'></div><h3>Parenting</h3> | |
<p>Unity uses a concept called <span class='doc-keyword'>Pare <p>Unity uses a concept called <span class='doc-keyword'>Pare | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>To learn more about Parenting, please revie <p class='vspace'>To learn more about Parenting, please revie | |
</p> </p> | |
<div class='vspace'></div><h2>Toolbar</h2> <div class='vspace'></div><h2>Toolbar</h2> | |
<div><img class='figure' src='Images/manual/LearningtheInterf <div><img class='figure' src='Images/manual/LearningtheInterf | |
<p class='vspace'>The Toolbar consists of five basic controls <p class='vspace'>The Toolbar consists of five basic controls | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Scene View</h2> <div class='vspace'></div><h2>Scene View</h2> | |
<div><img class='figure' src='Images/manual/LearningtheInterf <div><img class='figure' src='Images/manual/LearningtheInterf | |
<p class='vspace'>The <span class='doc-keyword'>Scene View</s <p class='vspace'>The <span class='doc-keyword'>Scene View</s | |
</p> </p> | |
<div class='vspace'></div><h3>Scene View Navigation</h3> <div class='vspace'></div><h3>Scene View Navigation</h3> | |
<p>See <a href="Manual/SceneViewNavigation.html">Scene View N <p>See <a href="Manual/SceneViewNavigation.html">Scene View N | |
</p> </p> | |
<div class='vspace'></div><ul><li>Hold the right mouse button <div class='vspace'></div><ul><li>Hold the right mouse button | |
</li><li>Select any GameObject and press the <span class='doc </li><li>Select any GameObject and press the <span class='doc | |
</li><li>Use the arrow keys to move around on the X/Z plane. </li><li>Use the arrow keys to move around on the X/Z plane. | |
</li><li>Hold <span class='doc-menu'>Alt</span> and click-dra </li><li>Hold <span class='doc-menu'>Alt</span> and click-dra | |
</li><li>Hold <span class='doc-menu'>Alt</span> and middle cl </li><li>Hold <span class='doc-menu'>Alt</span> and middle cl | |
</li><li>Hold <span class='doc-menu'>Alt</span> and right cli </li><li>Hold <span class='doc-menu'>Alt</span> and right cli | |
</li></ul><p class='vspace'>You might also find use in the <s </li></ul><p class='vspace'>You might also find use in the <s | |
</p><div><img class='figure' src='Images/manual/LearningtheIn </p><div><img class='figure' src='Images/manual/LearningtheIn | |
<p class='vspace'>In the upper-right corner of the Scene View <p class='vspace'>In the upper-right corner of the Scene View | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>You can click on any of the arms to snap th <p class='vspace'>You can click on any of the arms to snap th | |
</p> </p> | |
<div class='vspace'></div><h3>Positioning GameObjects</h3> <div class='vspace'></div><h3>Positioning GameObjects</h3> | |
<p>See <a href="Manual/PositioningGameObjects.html">Positioni <p>See <a href="Manual/PositioningGameObjects.html">Positioni | |
</p> </p> | |
<p class='vspace'>When building your games, you'll place lots <p class='vspace'>When building your games, you'll place lots | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h3>Scene View Control Bar</h3> <div class='vspace'></div><h3>Scene View Control Bar</h3> | |
<div><img class='figure' src='Images/manual/LearningtheInterf <div><img class='figure' src='Images/manual/LearningtheInterf | |
<p>The Scene View control bar lets you see the scene in vario <p>The Scene View control bar lets you see the scene in vario | |
</p> </p> | |
<div class='vspace'></div><h2>Game View</h2> <div class='vspace'></div><h2>Game View</h2> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p>The <span class='doc-keyword'>Game View</span> is rendered <p>The <span class='doc-keyword'>Game View</span> is rendered | |
</p> </p> | |
<div class='vspace'></div><h3>Play Mode</h3> <div class='vspace'></div><h3>Play Mode</h3> | |
<div><img class='figure' src='Images/manual/LearningtheInterf <div><img class='figure' src='Images/manual/LearningtheInterf | |
<p class='vspace'>Use the buttons in the Toolbar to control t <p class='vspace'>Use the buttons in the Toolbar to control t | |
</p> </p> | |
<div class='vspace'></div><h3>Game View Control Bar</h3> <div class='vspace'></div><h3>Game View Control Bar</h3> | |
<div><img class='figure' src='Images/manual/LearningtheInterf <div><img class='figure' src='Images/manual/LearningtheInterf | |
<p class='vspace'>The first drop-down on the Game View contro <p class='vspace'>The first drop-down on the Game View contro | |
</p> </p> | |
<p class='vspace'>Further to the right is the <span class='do <p class='vspace'>Further to the right is the <span class='do | |
</p> </p> | |
<p class='vspace'>Continuing to the right is the <span class= <p class='vspace'>Continuing to the right is the <span class= | |
</p> </p> | |
<p class='vspace'>Finally we have the <span class='doc-menu'> <p class='vspace'>Finally we have the <span class='doc-menu'> | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Game View Stats of your game.</em> <p><em>Game View Stats of your game.</em> | |
</p> </p> | |
<div class='vspace'></div><h2>Inspector</h2> <div class='vspace'></div><h2>Inspector</h2> | |
<div><img class='figure' src='Images/manual/LearningtheInterf <div><img class='figure' src='Images/manual/LearningtheInterf | |
<p>Games in Unity are made up of multiple <span class='doc-ke <p>Games in Unity are made up of multiple <span class='doc-ke | |
</p> </p> | |
<p class='vspace'>Any property that is displayed in the Inspe <p class='vspace'>Any property that is displayed in the Inspe | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Click the question mark beside any Componen <p class='vspace'>Click the question mark beside any Componen | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>You can click the tiny gear icon (or right- <p class='vspace'>You can click the tiny gear icon (or right- | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>The Inspector will also show any Import Set <p class='vspace'>The Inspector will also show any Import Set | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Use the <span class='doc-menu'>Layer</span> <p class='vspace'>Use the <span class='doc-menu'>Layer</span> | |
</p> </p> | |
<div class='vspace'></div><h3>Prefabs</h3> <div class='vspace'></div><h3>Prefabs</h3> | |
<p>If you have a Prefab selected, some additional buttons wil <p>If you have a Prefab selected, some additional buttons wil | |
</p> </p> | |
<div class='vspace'></div><h2>Other Views</h2> <div class='vspace'></div><h2>Other Views</h2> | |
<p>The Views described on this page covers the basics of the <p>The Views described on this page covers the basics of the | |
</p> </p> | |
<div class='vspace'></div><ul><li>The <a href="Manual/Console <div class='vspace'></div><ul><li>The <a href="Manual/Console | |
</li><li>The <a href="Manual/Animation.html">Animation View</ | </li><li>The <span style='font-size: 110%; font-weight: bold; | |
</li><li>The <a href="Manual/Profiler.html">Profiler</a> can </li><li>The <a href="Manual/Profiler.html">Profiler</a> can | |
</li><li>The <a href="Manual/AssetServer.html">Asset Server V </li><li>The <a href="Manual/AssetServer.html">Asset Server V | |
</li><li>The <a href="Manual/Lightmapping.html">Lightmapping </li><li>The <a href="Manual/Lightmapping.html">Lightmapping | |
</li><li>The <a href="Manual/OcclusionCulling.html">Occlusion </li><li>The <a href="Manual/OcclusionCulling.html">Occlusion | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2011-11-03</p> | </p><small>Page last updated: 2011-11-03</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Customizing Your Workspace'></a><h1>Customizing <hr><a name='Customizing Your Workspace'></a><h1>Customizing | |
<h2>Customizing Your Workspace</h2> | | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> <h2>Customizing Your Workspace</h2> | |
<p>You can customize your <span class='doc-keyword'>Layout</s <p>You can customize your <span class='doc-keyword'>Layout</s | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Tabs can also be detached from the Main Edi <p class='vspace'>Tabs can also be detached from the Main Edi | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>When you've created a Layout of Editor Wind <p class='vspace'>When you've created a Layout of Editor Wind | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>At any time, you can right-click the tab of <p class='vspace'>At any time, you can right-click the tab of | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
</p><small>Page last updated: 2010-09-07</p> | </p><small>Page last updated: 2010-09-07</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Asset Workflow'></a><h1>Asset Workflow</h1> <hr><a name='Asset Workflow'></a><h1>Asset Workflow</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Here we'll explain the steps to use a single asset with Un <p>Here we'll explain the steps to use a single asset with Un | |
</p> </p> | |
<div class='vspace'></div><h2>Create Rough Asset</h2> <div class='vspace'></div><h2>Create Rough Asset</h2> | |
<p>Use any supported 3D modeling package to create a rough ve <p>Use any supported 3D modeling package to create a rough ve | |
</p> </p> | |
<div class='vspace'></div><h2>Import</h2> <div class='vspace'></div><h2>Import</h2> | |
<p>When you save your asset initially, you should save it nor <p>When you save your asset initially, you should save it nor | |
</p> </p> | |
<div class='vspace'></div><h2>Import Settings</h2> <div class='vspace'></div><h2>Import Settings</h2> | |
<p>If you select the asset in the <span class='doc-keyword'>P <p>If you select the asset in the <span class='doc-keyword'>P | |
</p> </p> | |
<div class='vspace'></div><h2>Adding Asset to the Scene</h2> <div class='vspace'></div><h2>Adding Asset to the Scene</h2> | |
<p>Simply click and drag the mesh from the Project View to th <p>Simply click and drag the mesh from the Project View to th | |
</p> </p> | |
<div class='vspace'></div><h2>Putting Different Assets Togeth <div class='vspace'></div><h2>Putting Different Assets Togeth | |
<p>Here is a brief description of the relationships between t <p>Here is a brief description of the relationships between t | |
</p> </p> | |
<div class='vspace'></div><ul><li>A Texture is applied to a < <div class='vspace'></div><ul><li>A Texture is applied to a < | |
</li><li>A Material is applied to a GameObject (with a Mesh R </li><li>A Material is applied to a GameObject (with a Mesh R | |
</li><li>An <span class='doc-prop'>Animation</span> is applie </li><li>An <span class='doc-prop'>Animation</span> is applie | |
</li><li>A sound file is applied to a GameObject (with an <sp </li><li>A sound file is applied to a GameObject (with an <sp | |
</li></ul><div class='vspace'></div><h2>Creating a Prefab</h2 </li></ul><div class='vspace'></div><h2>Creating a Prefab</h2 | |
<p><span class='doc-keyword'>Prefabs</span> are a collection <p><span class='doc-keyword'>Prefabs</span> are a collection | |
</p> </p> | |
<p class='vspace'>When you have a GameObject that contains mu <p class='vspace'>When you have a GameObject that contains mu | |
</p> </p> | |
<p class='vspace'>Think of a Prefab as a blueprint for a stru <p class='vspace'>Think of a Prefab as a blueprint for a stru | |
</p> </p> | |
<p class='vspace'>To actually create a Prefab from a GameObje <p class='vspace'>To actually create a Prefab from a GameObje | |
</p> </p> | |
<div class='vspace'></div><h2>Updating Assets</h2> <div class='vspace'></div><h2>Updating Assets</h2> | |
<p>You have imported, instantiated, and linked your asset to <p>You have imported, instantiated, and linked your asset to | |
<a name='AssetLabels' id='AssetLabels'></a> <a name='AssetLabels' id='AssetLabels'></a> | |
</p><h2>Optional - Adding Labels to the Assets.</h2> </p><h2>Optional - Adding Labels to the Assets.</h2> | |
<p>Is always a good idea to add labels to your assets if you <p>Is always a good idea to add labels to your assets if you | |
</p> </p> | |
<p class='vspace'>Steps for adding a label to an asset: <p class='vspace'>Steps for adding a label to an asset: | |
</p><ul><li>Select the asset you want to add the label to (Fr </p><ul><li>Select the asset you want to add the label to (Fr | |
</li><li>In the inspector click on the "Add Label" icon (<img </li><li>In the inspector click on the "Add Label" icon (<img | |
<ul><li>If you have a label associated to an asset then just <ul><li>If you have a label associated to an asset then just | |
</li></ul></li><li>Start writing your labels. </li></ul></li><li>Start writing your labels. | |
</li></ul><p class='vspace'><b>Notes:</b> </li></ul><p class='vspace'><b>Notes:</b> | |
</p><ul><li>You can have more than one label for any asset. </p><ul><li>You can have more than one label for any asset. | |
</li><li>To separate/create labels, just press <b>space</b> o </li><li>To separate/create labels, just press <b>space</b> o | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2010-07-21</p> | </p><small>Page last updated: 2010-07-21</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Creating Scenes'></a><h1>Creating Scenes</h1> <hr><a name='Creating Scenes'></a><h1>Creating Scenes</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p><span class='doc-keyword'>Scenes</span> contain the object <p><span class='doc-keyword'>Scenes</span> contain the object | |
</p> </p> | |
<div class='vspace'></div><h2>Instancing Prefabs</h2> <div class='vspace'></div><h2>Instancing Prefabs</h2> | |
<p>Use the method described in the last section to create a < <p>Use the method described in the last section to create a < | |
</p> </p> | |
<div class='vspace'></div><h2>Adding Component & Scripts< <div class='vspace'></div><h2>Adding Component & Scripts< | |
<p>When you have a Prefab or any <span class='doc-keyword'>Ga <p>When you have a Prefab or any <span class='doc-keyword'>Ga | |
</p> </p> | |
<p class='vspace'>If adding a Component breaks the GameObject <p class='vspace'>If adding a Component breaks the GameObject | |
</p> </p> | |
<div class='vspace'></div><h2>Placing GameObjects</h2> <div class='vspace'></div><h2>Placing GameObjects</h2> | |
<p>Once your GameObject is in the scene, you can use the <spa <p>Once your GameObject is in the scene, you can use the <spa | |
</p> </p> | |
<div class='vspace'></div><h2>Working with Cameras</h2> <div class='vspace'></div><h2>Working with Cameras</h2> | |
<p><span class='doc-keyword'>Cameras</span> are the eyes of y <p><span class='doc-keyword'>Cameras</span> are the eyes of y | |
</p> </p> | |
<div class='vspace'></div><h2>Lights</h2> <div class='vspace'></div><h2>Lights</h2> | |
<p>Except for some very few cases, you will always need to ad <p>Except for some very few cases, you will always need to ad | |
</p> </p> | |
</p><small>Page last updated: 2009-02-16</p> | </p><small>Page last updated: 2009-02-16</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Publishing Builds'></a><h1>Publishing Builds</h1 <hr><a name='Publishing Builds'></a><h1>Publishing Builds</h1 | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>At any time while you are creating your game, you might wa <p>At any time while you are creating your game, you might wa | |
</p> </p> | |
<p class='vspace'><span class='doc-menu'>File->Build Setti <p class='vspace'><span class='doc-menu'>File->Build Setti | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>The first time you view this window in a pr <p class='vspace'>The first time you view this window in a pr | |
</p> </p> | |
<p class='vspace'>It is easy to add scene files to the list f <p class='vspace'>It is easy to add scene files to the list f | |
</p> </p> | |
<p class='vspace'>At this point, notice that each of your sce <p class='vspace'>At this point, notice that each of your sce | |
</p> </p> | |
<p class='vspace'>If you've added more than one scene file an <p class='vspace'>If you've added more than one scene file an | |
</p> </p> | |
<p class='vspace'>If you want to remove a scene from the list <p class='vspace'>If you want to remove a scene from the list | |
</p> </p> | |
<p class='vspace'>When you are ready to publish your build, s <p class='vspace'>When you are ready to publish your build, s | |
</p> </p> | |
<p class='vspace'>Enabling the <span class='doc-keyword'>Deve <p class='vspace'>Enabling the <span class='doc-keyword'>Deve | |
</p> </p> | |
<div class='vspace'></div><a class='desktopRef' id='desktopRe <div class='vspace'></div><a class='desktopRef' id='desktopRe | |
<div class='specific-desktop' style='display: block;' id='spe <div class='specific-desktop' style='display: block;' id='spe | |
<h2>Web Player Streaming</h2> <h2>Web Player Streaming</h2> | |
<p>Streaming Web Players allow your Web Player games to begin <p>Streaming Web Players allow your Web Player games to begin | |
</p> </p> | |
<p class='vspace'>Put simply, Streaming Web Players will get <p class='vspace'>Put simply, Streaming Web Players will get | |
</p> </p> | |
<p class='vspace'>The only thing you need to worry about is c <p class='vspace'>The only thing you need to worry about is c | |
</p> </p> | |
<p class='vspace'>Normally, in a non-streamed player, you use <p class='vspace'>Normally, in a non-streamed player, you use | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'> <div class='vspace'></div><pre class='codelisting'> | |
Application.LoadLevel("levelName"); Application.LoadLevel("levelName"); | |
</pre> </pre> | |
<p class='vspace'>In a Streaming Web Player, you must first c <p class='vspace'>In a Streaming Web Player, you must first c | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'> <div class='vspace'></div><pre class='codelisting'> | |
var levelToLoad = 1; var levelToLoad = 1; | |
function LoadNewLevel () { function LoadNewLevel () { | |
if (Application.CanStreamedLevelBeLoaded (levelToLoad if (Application.CanStreamedLevelBeLoaded (levelToLoad | |
Application.LoadLevel (levelToLoad); Application.LoadLevel (levelToLoad); | |
} } | |
} } | |
</pre> </pre> | |
<p class='vspace'>If you would like to display the level stre <p class='vspace'>If you would like to display the level stre | |
</p> </p> | |
<div class='vspace'></div><h2>Offline webplayer deployment</h <div class='vspace'></div><h2>Offline webplayer deployment</h | |
<p>If the Offline Deployment option is enabled for a webplaye <p>If the Offline Deployment option is enabled for a webplaye | |
</p> </p> | |
<div class='vspace'></div><h2>Building standalone players</h2 <div class='vspace'></div><h2>Building standalone players</h2 | |
<p>With Unity you can build standalone applications for Windo <p>With Unity you can build standalone applications for Windo | |
When building standalone players, the resulting files will va When building standalone players, the resulting files will va | |
</p> </p> | |
<p class='vspace'>Distributing your standalone on Mac is just <p class='vspace'>Distributing your standalone on Mac is just | |
</p> </p> | |
<div class='vspace'></div><h2>Inside the build process</h2> <div class='vspace'></div><h2>Inside the build process</h2> | |
<p>The building process will place a blank copy of the built <p>The building process will place a blank copy of the built | |
</p> </p> | |
<div class='vspace'></div><ul><li>Any <span class='doc-keywor <div class='vspace'></div><ul><li>Any <span class='doc-keywor | |
<div class='vspace'></div></li><li>When a new level loads, al <div class='vspace'></div></li><li>When a new level loads, al | |
<div class='vspace'></div></li><li>After the loading of a new <div class='vspace'></div></li><li>After the loading of a new | |
</li><li>For more information on how to best create a game wi </li><li>For more information on how to best create a game wi | |
</li></ul></div> </li></ul></div> | |
<a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i <a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i | |
<div class='specific-ios' style='display: block;' id='specifi <div class='specific-ios' style='display: block;' id='specifi | |
<h2>Inside the iOS build process</h2> <h2>Inside the iOS build process</h2> | |
<p>The iPhone/iPad application build process is a two step pr <p>The iPhone/iPad application build process is a two step pr | |
</p><ol><li>XCode project is generated with all the required </p><ol><li>XCode project is generated with all the required | |
</li><li>XCode project is built and deployed on the actual de </li><li>XCode project is built and deployed on the actual de | |
</li></ol><p class='vspace'>When "Build" is hit on "Build set </li></ol><p class='vspace'>When "Build" is hit on "Build set | |
If in the project save dialog the user selects an already exi If in the project save dialog the user selects an already exi | |
</p><ul><li><span class='doc-prop'>replace</span> - all the f </p><ul><li><span class='doc-prop'>replace</span> - all the f | |
</li><li><span class='doc-prop'>append</span> - the "Data", " </li><li><span class='doc-prop'>append</span> - the "Data", " | |
</li></ul><p class='vspace'>If Cmd+B is hit then the automati </li></ul><p class='vspace'>If Cmd+B is hit then the automati | |
</p></div> </p></div> | |
<p class='vspace'><a name='Android' id='Android'></a> <p class='vspace'><a name='Android' id='Android'></a> | |
</p><a class='androidRef' id='androidRef' href="javascript:Sh </p><a class='androidRef' id='androidRef' href="javascript:Sh | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<p>The Android application build process is performed in two <p>The Android application build process is performed in two | |
</p><ol><li>Application package (.apk file) is generated with </p><ol><li>Application package (.apk file) is generated with | |
</li><li>Application package is deployed on the actual device </li><li>Application package is deployed on the actual device | |
</li></ol><p class='vspace'>When "Build" is hit on "Build set </li></ol><p class='vspace'>When "Build" is hit on "Build set | |
If Cmd+B is hit then the automatic build and run process is i If Cmd+B is hit then the automatic build and run process is i | |
</p> </p> | |
<p class='vspace'>Upon the first attempt to build an Android <p class='vspace'>Upon the first attempt to build an Android | |
You can change this setting later in <span class='doc-menu'>P You can change this setting later in <span class='doc-menu'>P | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>When building the app to the Android, be su <p class='vspace'>When building the app to the Android, be su | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>You can ensure that the operating system se <p class='vspace'>You can ensure that the operating system se | |
This should work both for Mac and Windows. This should work both for Mac and Windows. | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Unity builds an application archive (.apk f <p class='vspace'>Unity builds an application archive (.apk f | |
In some cases your application cannot autostart like on iPhon In some cases your application cannot autostart like on iPhon | |
</p> </p> | |
<div class='vspace'></div><h2>Texture Compression</h2> <div class='vspace'></div><h2>Texture Compression</h2> | |
<p>Under <span class='doc-keyword'>Build Settings</span> you' <p>Under <span class='doc-keyword'>Build Settings</span> you' | |
</p> </p> | |
<p class='vspace'>If you want to build an application archive <p class='vspace'>If you want to build an application archive | |
Any texture that is set to not be compressed will be left alo Any texture that is set to not be compressed will be left alo | |
</p> </p> | |
<p class='vspace'>To make sure the application is only deploy <p class='vspace'>To make sure the application is only deploy | |
This will enable the Android Market filtering mechanism to on This will enable the Android Market filtering mechanism to on | |
</p> </p> | |
<div class='vspace'></div></div> <div class='vspace'></div></div> | |
<div class='vspace'></div><h2>Preloading</h2> <div class='vspace'></div><h2>Preloading</h2> | |
<p>Published builds automatically preload all assets in a sce <p>Published builds automatically preload all assets in a sce | |
</p> </p> | |
<p class='vspace'>To make sure all your content is preloaded, <p class='vspace'>To make sure all your content is preloaded, | |
</p> </p> | |
<div class='vspace'></div><h2>You're ready to build games</h2 <div class='vspace'></div><h2>You're ready to build games</h2 | |
<p>By now, you have learned how to use Unity's interface, how <p>By now, you have learned how to use Unity's interface, how | |
</p> </p> | |
<p class='vspace'>To learn more details about using Unity its <p class='vspace'>To learn more details about using Unity its | |
</p> </p> | |
<p class='vspace'>To learn more about Components, the nuts &a <p class='vspace'>To learn more about Components, the nuts &a | |
</p> </p> | |
<p class='vspace'>To learn more about Scripting, please read <p class='vspace'>To learn more about Scripting, please read | |
</p> </p> | |
<p class='vspace'>To learn more about creating Art assets, pl <p class='vspace'>To learn more about creating Art assets, pl | |
</p> </p> | |
<p class='vspace'>To interact with the community of Unity use <p class='vspace'>To interact with the community of Unity use | |
</p> </p> | |
</p><small>Page last updated: 2011-10-31</p> | </p><small>Page last updated: 2011-10-31</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Tutorials'></a><h1>Tutorials</h1> <hr><a name='Tutorials'></a><h1>Tutorials</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>These tutorials will let you work with Unity while you fol <p>These tutorials will let you work with Unity while you fol | |
</p> </p> | |
<p class='vspace'><b>Note:</b> These Tutorials are intended f <p class='vspace'><b>Note:</b> These Tutorials are intended f | |
</p> </p> | |
<div class='vspace'></div><div><a class='urllink' href='http: <div class='vspace'></div><div><a class='urllink' href='http: | |
<p class='vspace'>Also if you are searching for other resourc <p class='vspace'>Also if you are searching for other resourc | |
</p> </p> | |
<p class='vspace'>You can also check the latest additions abo <p class='vspace'>You can also check the latest additions abo | |
</p> </p> | |
</p><small>Page last updated: 2010-09-10</p> | </p><small>Page last updated: 2010-09-10</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Unity Hotkeys'></a><h1>Unity Hotkeys</h1> <hr><a name='Unity Hotkeys'></a><h1>Unity Hotkeys</h1> | |
<p><b>This page gives an overview of the default Unity Hotkey | | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> <p><b>This page gives an overview of the default Unity Ho | |
</p> </p> | |
<div class='vspace'></div><div><a href="Images/manual/Unity_H <div class='vspace'></div><div><a href="Images/manual/Unity_H | |
<div class='vspace'></div> <div class='vspace'></div> | |
</p><small>Page last updated: 2011-07-20</p> | </p><small>Page last updated: 2011-07-20</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Preferences'></a><h1>Preferences</h1> <hr><a name='Preferences'></a><h1>Preferences</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity provides a number of preference panels to allow you <p>Unity provides a number of preference panels to allow you | |
</p> </p> | |
<div class='vspace'></div><h2>General</h2> <div class='vspace'></div><h2>General</h2> | |
<div><img class='figure' src='Images/manual/Preferences-0.jpg <div><img class='figure' src='Images/manual/Preferences-0.jpg | |
<div class='vspace'></div><table width='100%'><tr ><td ><span <div class='vspace'></div><table width='100%'><tr ><td ><span | |
<tr ><td ><span class='doc-prop'>Always Show Project Wizard</ <tr ><td ><span class='doc-prop'>Always Show Project Wizard</ | |
<tr ><td ><span class='doc-prop'>Compress Assets On Import</s <tr ><td ><span class='doc-prop'>Compress Assets On Import</s | |
<tr ><td ><span class='doc-prop'>OSX Color Picker</span></td> <tr ><td ><span class='doc-prop'>OSX Color Picker</span></td> | |
<tr ><td ><span class='doc-prop'>Editor Analytics</span></td> <tr ><td ><span class='doc-prop'>Editor Analytics</span></td> | |
<tr ><td ><span class='doc-prop'>Verify Saving Assets</span>< <tr ><td ><span class='doc-prop'>Verify Saving Assets</span>< | |
<tr ><td ><span class='doc-prop'>Skin (Pro Only)</span></td>< <tr ><td ><span class='doc-prop'>Skin (Pro Only)</span></td>< | |
<tr ><td ><span class='doc-prop'>Graphics Device</span></td>< <tr ><td ><span class='doc-prop'>Graphics Device</span></td>< | |
</table> </table> | |
<div class='vspace'></div><h2>External Tools</h2> <div class='vspace'></div><h2>External Tools</h2> | |
<div><img class='figure' src='Images/manual/Preferences-1.jpg <div><img class='figure' src='Images/manual/Preferences-1.jpg | |
<div class='vspace'></div><table width='100%'><tr ><td ><span <div class='vspace'></div><table width='100%'><tr ><td ><span | |
<tr ><td ><span class='doc-prop'>Editor Attaching</span></td> <tr ><td ><span class='doc-prop'>Editor Attaching</span></td> | |
<tr ><td ><span class='doc-prop'>Image Application</span></td <tr ><td ><span class='doc-prop'>Image Application</span></td | |
<tr ><td ><span class='doc-prop'>Asset Server Diff Tool</span <tr ><td ><span class='doc-prop'>Asset Server Diff Tool</span | |
<tr ><td ><span class='doc-prop'>Android SDK Location</span>< <tr ><td ><span class='doc-prop'>Android SDK Location</span>< | |
<tr ><td ><span class='doc-prop'>iOS Xcode 4.x support</span> <tr ><td ><span class='doc-prop'>iOS Xcode 4.x support</span> | |
</table> </table> | |
<div class='vspace'></div><h2>Colors</h2> <div class='vspace'></div><h2>Colors</h2> | |
<div><img class='figure' src='Images/manual/Preferences-2.jpg <div><img class='figure' src='Images/manual/Preferences-2.jpg | |
<p class='vspace'>This panel allows you to choose the colors <p class='vspace'>This panel allows you to choose the colors | |
</p> </p> | |
<div class='vspace'></div><h2>Keys</h2> <div class='vspace'></div><h2>Keys</h2> | |
<div><img class='figure' src='Images/manual/Preferences-3.jpg <div><img class='figure' src='Images/manual/Preferences-3.jpg | |
<p class='vspace'>This panel allows you to set the keystrokes <p class='vspace'>This panel allows you to set the keystrokes | |
</p> </p> | |
<div class='vspace'></div><h2>Cache Server</h2> <div class='vspace'></div><h2>Cache Server</h2> | |
<div><img class='figure' src='Images/manual/Preferences-4.jpg <div><img class='figure' src='Images/manual/Preferences-4.jpg | |
<div class='vspace'></div><table width='100%'><tr ><td ><span <div class='vspace'></div><table width='100%'><tr ><td ><span | |
<tr ><td ><span class='doc-prop'>IP Address</span></td><td >I <tr ><td ><span class='doc-prop'>IP Address</span></td><td >I | |
</table> </table> | |
</p><small>Page last updated: 2012-06-21</p> | </p><small>Page last updated: 2012-06-21</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Building Scenes'></a><h1>Building Scenes</h1> <hr><a name='Building Scenes'></a><h1>Building Scenes</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>This section will explain the core elements you will work <p>This section will explain the core elements you will work | |
</p> </p> | |
<div class='vspace'></div><ul><li class='toclink'><a href="Ma <div class='vspace'></div><ul><li class='toclink'><a href="Ma | |
<ul><li class='toclink'><a href="Manual/TheGameObject-Compone <ul><li class='toclink'><a href="Manual/TheGameObject-Compone | |
</li></ul></li></ul><div class='specific-u30' style='display: | </li></ul></li></ul> | |
<dl><dd><ul><li class='toclink'><a href="Manual/UsingComponen | <div class='specific-u40' style='display: block;' id='specifi | |
> <dl><dd><ul><li class='toclink'><a href="Manual/UsingComponen | |
</li></ul></dd></dl></div> </li></ul></dd></dl></div> | |
< | |
<dl><dd><ul><li class='toclink'><a href="Manual/TheComponent- <dl><dd><ul><li class='toclink'><a href="Manual/TheComponent- | |
</li></ul></dd></dl> | </li></ul></dd></dl><div class='specific-u40' style='display: | |
> <dl><dd><ul><li class='toclink'><a href="Manual/DeactivatingG | |
> </li></ul></dd></dl></div> | |
<ul><li class='toclink'><a href="Manual/UsingTheInspector.htm <ul><li class='toclink'><a href="Manual/UsingTheInspector.htm | |
</li></ul><div class='specific-u30' style='display: block;' i | </li></ul> | |
<dl><dd><ul><li class='toclink'><a href="Manual/EditingValueP | <div class='specific-u40' style='display: block;' id='specifi | |
> <dl><dd><ul><li class='toclink'><a href="Manual/EditingValueP | |
</li></ul></dd></dl></div> </li></ul></dd></dl></div> | |
< | |
<dl><dd><ul><li class='toclink'><a href="Manual/EditingRefere <dl><dd><ul><li class='toclink'><a href="Manual/EditingRefere | |
</li><li class='toclink'><a href="Manual/Multi-ObjectEditing. </li><li class='toclink'><a href="Manual/Multi-ObjectEditing. | |
</li><li class='toclink'><a href="Manual/InspectorOptions.htm </li><li class='toclink'><a href="Manual/InspectorOptions.htm | |
</li></ul></dd></dl><ul><li class='toclink'><a href="Manual/U </li></ul></dd></dl><ul><li class='toclink'><a href="Manual/U | |
<ul><li class='toclink'><a href="Manual/SceneViewNavigation.h <ul><li class='toclink'><a href="Manual/SceneViewNavigation.h | |
</li><li class='toclink'><a href="Manual/PositioningGameObjec </li><li class='toclink'><a href="Manual/PositioningGameObjec | |
</li><li class='toclink'><a href="Manual/ViewModes.html">View </li><li class='toclink'><a href="Manual/ViewModes.html">View | |
</li><li class='toclink'><a href="Manual/GizmoandIconVisibili </li><li class='toclink'><a href="Manual/GizmoandIconVisibili | |
</li></ul></li><li class='toclink'><a href="Manual/Searching. </li></ul></li><li class='toclink'><a href="Manual/Searching. | |
</li><li class='toclink'><a href="Manual/Prefabs.html">Prefab </li><li class='toclink'><a href="Manual/Prefabs.html">Prefab | |
</li><li class='toclink'><a href="Manual/Lights.html">Lights< </li><li class='toclink'><a href="Manual/Lights.html">Lights< | |
</li><li class='toclink'><a href="Manual/Cameras.html">Camera </li><li class='toclink'><a href="Manual/Cameras.html">Camera | |
</li><li class='toclink'><a href="Manual/Terrains.html">Terra </li><li class='toclink'><a href="Manual/Terrains.html">Terra | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2007-11-16</p> | </p><small>Page last updated: 2007-11-16</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='GameObjects'></a><h1>GameObjects</h1> <hr><a name='GameObjects'></a><h1>GameObjects</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p><span class='doc-keyword'>GameObjects</span> are the most <p><span class='doc-keyword'>GameObjects</span> are the most | |
</p> </p> | |
<div class='vspace'></div><h2>What are GameObjects?</h2> <div class='vspace'></div><h2>What are GameObjects?</h2> | |
<p>Every object in your game is a GameObject. However, GameO <p>Every object in your game is a GameObject. However, GameO | |
</p> </p> | |
<p class='vspace'>The answer to this question is that GameObj <p class='vspace'>The answer to this question is that GameObj | |
</p> </p> | |
<p class='vspace'>You can read more about GameObjects, Compon <p class='vspace'>You can read more about GameObjects, Compon | |
</p> </p> | |
<div class='vspace'></div><ul><li class='toclink'><a href="Ma <div class='vspace'></div><ul><li class='toclink'><a href="Ma | |
</li></ul><div class='specific-u30' style='display: block;' i | </li></ul> | |
<ul><li class='toclink'><a href="Manual/UsingComponents.html" | <div class='specific-u40' style='display: block;' id='specifi | |
> <ul><li class='toclink'><a href="Manual/UsingComponents40.htm | |
</li></ul></div> </li></ul></div> | |
< | |
<ul><li class='toclink'><a href="Manual/TheComponent-ScriptRe <ul><li class='toclink'><a href="Manual/TheComponent-ScriptRe | |
</li></ul> | </li></ul><div class='specific-u40' style='display: block;' i | |
</p><small>Page last updated: 2010-09-14</p> | <ul><li class='toclink'><a href="Manual/DeactivatingGameObjec | |
<script type="text/javascript"> | </li></ul></div> | |
| </p><small>Page last updated: 2010-09-14</p><br/> | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='The GameObject-Component Relationship'></a><h1>T <hr><a name='The GameObject-Component Relationship'></a><h1>T | |
<p>As described on the <a href="Manual/GameObjects.html">Game | <script src="Images/showhide.js" type="text/javascript">< | |
> | |
> <p>As described previously in <a href="Manual/GameObjects.htm | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Notice that an empty GameObject still conta <p class='vspace'>Notice that an empty GameObject still conta | |
</p> </p> | |
<div class='vspace'></div><h2>The Transform Component</h2> <div class='vspace'></div><h2>The Transform Component</h2> | |
<p>It is impossible to create a GameObject in Unity without a <p>It is impossible to create a GameObject in Unity without a | |
</p> </p> | |
<p class='vspace'>The Transform Component also enables a conc | <p class='vspace'>The Transform Component also enables a conc | |
</p> </p> | |
<div class='vspace'></div><h2>Other Components</h2> <div class='vspace'></div><h2>Other Components</h2> | |
<p>The Transform Component just happens to be critical to all | <p>The Transform Component is critical to all GameObjects, so | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Taking a look at the Main Camera GameObject | <p class='vspace'>Looking at the Main Camera GameObject, you | |
</p> </p> | |
</p><small>Page last updated: 2010-09-14</p> | </p><small>Page last updated: 2012-08-13</p><br/> | |
<script type="text/javascript"> | <hr><a name='Using Components40'></a><h1>Using Components40</ | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
function DocLoaded() { | <script src="Images/showhide.js" type="text/javascript">< | |
document.divs = document.getElementsByTagName('div'); | | |
var prefDesktop = GetCookie('desktopRef'); | <p><span class='doc-keyword'>Components</span> are the nuts & | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Using Components'></a><h1>Using Components</h1> < | |
< | |
<p><span class='doc-keyword'>Components</span> are the nuts & < | |
</p> </p> | |
<p class='vspace'>A GameObject is a container for many differ <p class='vspace'>A GameObject is a container for many differ | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image | <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Even empty GameObjects have a Transform Component</em> <p><em>Even empty GameObjects have a Transform Component</em> | |
</p> </p> | |
<p class='vspace'>Remember that you can always use the Inspec <p class='vspace'>Remember that you can always use the Inspec | |
</p> </p> | |
<div class='vspace'></div><h2>Adding Components</h2> <div class='vspace'></div><h2>Adding Components</h2> | |
<p>You can add Components to the selected GameObject through <p>You can add Components to the selected GameObject through | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image | <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>An empty GameObject with a Rigidbody Component attache <p><em>An empty GameObject with a Rigidbody Component attache | |
</p> </p> | |
> <p class='vspace'>Another option is to use the <span class='d | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>The browser lets you navigate the component | |
> </p> | |
<p class='vspace'>You can attach any number or combination of <p class='vspace'>You can attach any number or combination of | |
</p> </p> | |
<p class='vspace'>If you want to know more about using a part <p class='vspace'>If you want to know more about using a part | |
</p> </p> | |
<div class='vspace'></div><h2>Editing Components</h2> <div class='vspace'></div><h2>Editing Components</h2> | |
<p>One of the great aspects of Components is flexibility. Wh <p>One of the great aspects of Components is flexibility. Wh | |
<span class='doc-keyword'>Properties</span> in the Component <span class='doc-keyword'>Properties</span> in the Component | |
</p> </p> | |
<p class='vspace'>Look at the image below. It is an empty Ga <p class='vspace'>Look at the image below. It is an empty Ga | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image | <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>This Component contains a single Reference <p class='vspace'>This Component contains a single Reference | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image | <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Now a sound effect file is referenced in the <span cla <p><em>Now a sound effect file is referenced in the <span cla | |
</p> </p> | |
<p class='vspace'>Components can include references to any ot <p class='vspace'>Components can include references to any ot | |
</p> </p> | |
<p class='vspace'>The remaining properties on the Audio Clip | <p class='vspace'>The remaining properties on the Audio Clip | |
> </p> | |
> <div class='vspace'></div><h2>Copying and pasting Component s | |
> <p>The context menu for a Component has items for copying and | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>The copied values can be pasted to an exist | |
</p> </p> | |
<div class='vspace'></div><h2>Testing out Properties</h2> <div class='vspace'></div><h2>Testing out Properties</h2> | |
<p>While your game is in <span class='doc-keyword'>Play Mode< <p>While your game is in <span class='doc-keyword'>Play Mode< | |
</p> </p> | |
> <div class='vspace'></div><h2>Changing the order of Component | |
> <p>The order in which components are listed in the Inspector | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Removing Components</h2> <div class='vspace'></div><h2>Removing Components</h2> | |
<p>If you want to remove a Component, option- or right-click <p>If you want to remove a Component, option- or right-click | |
</p> </p> | |
</p><small>Page last updated: 2012-06-19</p> | </p><small>Page last updated: 2012-08-13</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='The Component-Script Relationship'></a><h1>The C <hr><a name='The Component-Script Relationship'></a><h1>The C | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>When you create a <span class='doc-keyword'>script</span> <p>When you create a <span class='doc-keyword'>script</span> | |
</p> </p> | |
<p class='vspace'>Read more about creating and using scripts <p class='vspace'>Read more about creating and using scripts | |
</p> </p> | |
</p><small>Page last updated: 2010-09-14</p> | </p><small>Page last updated: 2010-09-14</p><br/> | |
<script type="text/javascript"> | <hr><a name='DeactivatingGameObjects'></a><h1>DeactivatingGam | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
> <p>A GameObject can be temporarily removed from the scene by | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>From Unity 4.0, deactivating a GameObject w | |
> </p> | |
> </p><small>Page last updated: 2012-06-21</p><br/> | |
> <hr><a name='Using The Inspector'></a><h1>Using The Inspector | |
var allHTMLTags = new Array(); | <script src="Images/showhide.js" type="text/javascript">< | |
document.divs = new Array(); | | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Using The Inspector'></a><h1>Using The Inspector < | |
< | |
<p>The <span class='doc-keyword'>Inspector</span> is used to <p>The <span class='doc-keyword'>Inspector</span> is used to | |
</p> </p> | |
<p class='vspace'>Games in Unity are made up of multiple <spa <p class='vspace'>Games in Unity are made up of multiple <spa | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>When you create a <span class='doc-keyword' <p class='vspace'>When you create a <span class='doc-keyword' | |
</p> </p> | |
<p class='vspace'>Furthermore, the Inspector is used for show <p class='vspace'>Furthermore, the Inspector is used for show | |
</p> </p> | |
<p class='vspace'>Any property that is displayed in the Inspe <p class='vspace'>Any property that is displayed in the Inspe | |
</p> </p> | |
<div class='vspace'></div><div class='specific-u30' style='di | <div class='vspace'></div> | |
<ul><li class='toclink'><a href="Manual/EditingValuePropertie | <div class='specific-u40' style='display: block;' id='specifi | |
> <ul><li class='toclink'><a href="Manual/EditingValuePropertie | |
</li></ul></div> </li></ul></div> | |
< | |
<ul><li class='toclink'><a href="Manual/EditingReferencePrope <ul><li class='toclink'><a href="Manual/EditingReferencePrope | |
</li><li class='toclink'><a href="Manual/Multi-ObjectEditing. </li><li class='toclink'><a href="Manual/Multi-ObjectEditing. | |
</li><li class='toclink'><a href="Manual/InspectorOptions.htm </li><li class='toclink'><a href="Manual/InspectorOptions.htm | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2010-09-13</p> | </p><small>Page last updated: 2010-09-13</p><br/> | |
<script type="text/javascript"> | <hr><a name='Editing Value Properties40'></a><h1>Editing Valu | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Editing Value Properties'></a><h1>Editing Value < | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Value properties do not reference anything and they can be <p>Value properties do not reference anything and they can be | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image | <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Many value properties have a text field and <p class='vspace'>Many value properties have a text field and | |
</p> </p> | |
<div class='vspace'></div><ul><li>You can also put your mouse <div class='vspace'></div><ul><li>You can also put your mouse | |
</li><li>Some numeric properties also have a slider that can </li><li>Some numeric properties also have a slider that can | |
</li></ul><p class='vspace'>Some Value Properties open up a s </li></ul><p class='vspace'>Some Value Properties open up a s | |
</p> </p> | |
<div class='vspace'></div><h2>Color Picker</h2> <div class='vspace'></div><h2>Color Picker</h2> | |
<p>Properties of the <span class='doc-keyword'>Color</span> t <p>Properties of the <span class='doc-keyword'>Color</span> t | |
</p> </p> | |
<p class='vspace'>The Color Picker reference in the inspector <p class='vspace'>The Color Picker reference in the inspector | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image | <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>And opens the Color Picker just by clicking <p class='vspace'>And opens the Color Picker just by clicking | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image | <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Use the <span class='doc-keyword'>Eyedroppe <p class='vspace'>Use the <span class='doc-keyword'>Eyedroppe | |
</p> </p> | |
<div class='vspace'></div><h2>Curve Editor</h2> <div class='vspace'></div><h2>Curve Editor</h2> | |
<p>Properties of the <span class='doc-keyword'>AnimationCurve | <p>Properties of the <span class='doc-keyword'>AnimationCurve | |
</p> </p> | |
<p class='vspace'>The type is called AnimationCurve for legac <p class='vspace'>The type is called AnimationCurve for legac | |
</p> </p> | |
<p class='vspace'>An AnimationCurve property is shown in the <p class='vspace'>An AnimationCurve property is shown in the | |
</p><div><img class='figure' src='Images/manual/EditingValueP | </p><div><img class='figure' src='Images/manual/EditingValueP | |
<p class='vspace'>Clicking on it opens the Curve Editor: <p class='vspace'>Clicking on it opens the Curve Editor: | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image | <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'><span class='doc-keyword'>Wrapping Mode</sp | <p class='vspace'><span class='doc-keyword'>Wrapping Mode</sp | |
</p> </p> | |
<div class='vspace'></div> | <div class='vspace'></div><h2>Gradient editor</h2> | |
</p><small>Page last updated: 2010-09-13</p> | <p>In graphics and animation, it is often useful to be able t | |
<script type="text/javascript"> | </p> | |
| <div class='vspace'></div><div><img class='figure' src='Image | |
| <p class='vspace'>The upward-pointing arrows along the bottom | |
var allHTMLTags = new Array(); | </p> | |
document.divs = new Array(); | <p class='vspace'>The downward-pointing arrows above the grad | |
| </p> | |
function getElementByClass(theClass) { | </p><small>Page last updated: 2012-08-13</p><br/> | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Editing Reference Properties'></a><h1>Editing Re <hr><a name='Editing Reference Properties'></a><h1>Editing Re | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Reference properties are properties that reference other o <p>Reference properties are properties that reference other o | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>The <span class='doc-prop'>Audio Clip</span> property <p><em>The <span class='doc-prop'>Audio Clip</span> property | |
</p><div><img class='figure' src='Images/manual/EditingRefere </p><div><img class='figure' src='Images/manual/EditingRefere | |
<p><em>Now an <span class='doc-prop'>Audio Clip</span> file i <p><em>Now an <span class='doc-prop'>Audio Clip</span> file i | |
</p> </p> | |
<p class='vspace'>This type of referencing is very quick and | <p class='vspace'>This type of referencing is very quick and | |
</p> </p> | |
<p class='vspace'>Object references can be assigned to a refe <p class='vspace'>Object references can be assigned to a refe | |
</p> </p> | |
<div class='vspace'></div><h2>Drag and Drop</h2> <div class='vspace'></div><h2>Drag and Drop</h2> | |
<p>You can use drag and drop simply by selecting the desired <p>You can use drag and drop simply by selecting the desired | |
</p> </p> | |
<p class='vspace'>If a reference property accepts a specific <p class='vspace'>If a reference property accepts a specific | |
</p> </p> | |
<p class='vspace'>If you drag an object onto an reference pro <p class='vspace'>If you drag an object onto an reference pro | |
</p> </p> | |
<p class='vspace'><a name='ObjectPicker' id='ObjectPicker'></ <p class='vspace'><a name='ObjectPicker' id='ObjectPicker'></ | |
</p><h2>The Object Picker</h2> </p><h2>The Object Picker</h2> | |
<p>You can click on the small target icon next to a reference <p>You can click on the small target icon next to a reference | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>The Object Picker is a simple window for as <p class='vspace'>The Object Picker is a simple window for as | |
</p> </p> | |
<p class='vspace'>Although the Object Picker is really easy t <p class='vspace'>Although the Object Picker is really easy t | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><ol><li><span class='doc-keyword'>S <div class='vspace'></div><ol><li><span class='doc-keyword'>S | |
</li><li><span class='doc-keyword'>View Selector:</span> Swit </li><li><span class='doc-keyword'>View Selector:</span> Swit | |
</li><li><span class='doc-keyword'>Preview Size:</span> This </li><li><span class='doc-keyword'>Preview Size:</span> This | |
</li><li><span class='doc-keyword'>Preview Window:</span> Her </li><li><span class='doc-keyword'>Preview Window:</span> Her | |
</li><li><span class='doc-keyword'>Object Info:</span> Displa | </li><li><span class='doc-keyword'>Object Info:</span> Displa | |
</li><li><span class='doc-keyword'>Object Preview:</span> Thi </li><li><span class='doc-keyword'>Object Preview:</span> Thi | |
</li></ol><p class='vspace'>The Object Picker works on any as </li></ol><p class='vspace'>The Object Picker works on any as | |
</p> </p> | |
<div class='vspace'></div><h3>Hints</h3> <div class='vspace'></div><h3>Hints</h3> | |
<ul><li>Use <a href="Manual/AssetWorkflow.html#AssetLabels">L | <ul><li>Use <a href="Manual/AssetWorkflow.html#AssetLabels">L | |
</li><li>If you dont want to see the descriptions of the obje </li><li>If you dont want to see the descriptions of the obje | |
</li><li>If you want to see a detailed preview of the object, </li><li>If you want to see a detailed preview of the object, | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2010-09-10</p> | </p><small>Page last updated: 2012-08-13</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Multi-Object Editing'></a><h1>Multi-Object Editi <hr><a name='Multi-Object Editing'></a><h1>Multi-Object Editi | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Starting in Unity 3.5 you can select multiple objects of t <p>Starting in Unity 3.5 you can select multiple objects of t | |
</p> </p> | |
<p class='vspace'>When selecting multiple objects, a componen <p class='vspace'>When selecting multiple objects, a componen | |
</p> </p> | |
<div class='vspace'></div><h2>Property Values</h2> <div class='vspace'></div><h2>Property Values</h2> | |
<p class='vspace'>When multiple objects are selected, each pr <p class='vspace'>When multiple objects are selected, each pr | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='indent'> <em>Multi-edit of two object <div class='indent'> <em>Multi-edit of two object | |
</div><p class='vspace'>Regardless of whether a value is show </div><p class='vspace'>Regardless of whether a value is show | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='indent'> <em>Selecting which object t <div class='indent'> <em>Selecting which object t | |
</div><div class='vspace'></div><h2>Multi-Editing Prefab or M </div><div class='vspace'></div><h2>Multi-Editing Prefab or M | |
<p>Prefabs can be multi-edited just like Game Objects in the <p>Prefabs can be multi-edited just like Game Objects in the | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='indent'> <em>Instance Managment Disab <div class='indent'> <em>Instance Managment Disab | |
</div><div class='vspace'></div><h2>Non-Supported Objects</h2 </div><div class='vspace'></div><h2>Non-Supported Objects</h2 | |
<p>A few object types do not support multi-object editing. Wh <p>A few object types do not support multi-object editing. Wh | |
</p> </p> | |
<p class='vspace'>If you have made a custom editor for one of <p class='vspace'>If you have made a custom editor for one of | |
</p> </p> | |
</p><small>Page last updated: 2012-01-23</p> | </p><small>Page last updated: 2012-01-23</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Inspector Options'></a><h1>Inspector Options</h1 <hr><a name='Inspector Options'></a><h1>Inspector Options</h1 | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>The Inspector Lock and the Inspector Debug Mode are two us <p>The Inspector Lock and the Inspector Debug Mode are two us | |
</p> </p> | |
<div class='vspace'></div><h2>Lock</h2> <div class='vspace'></div><h2>Lock</h2> | |
<p>The Lock lets you maintain focus on a specific GameObject <p>The Lock lets you maintain focus on a specific GameObject | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Note that you can have more than one Inspec <p class='vspace'>Note that you can have more than one Inspec | |
</p> </p> | |
<div class='vspace'></div><h2>Debug</h2> <div class='vspace'></div><h2>Debug</h2> | |
<p>The Debug Mode lets you inspect private variables of compo <p>The Debug Mode lets you inspect private variables of compo | |
</p> </p> | |
<p class='vspace'>In Debug Mode, all components are shown usi <p class='vspace'>In Debug Mode, all components are shown usi | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>The Debug mode is per Inspector and you can <p class='vspace'>The Debug mode is per Inspector and you can | |
</p> </p> | |
</p><small>Page last updated: 2010-09-09</p> | </p><small>Page last updated: 2010-09-09</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Using The Scene View'></a><h1>Using The Scene Vi <hr><a name='Using The Scene View'></a><h1>Using The Scene Vi | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>The <span class='doc-keyword'>Scene View</span> is your in <p>The <span class='doc-keyword'>Scene View</span> is your in | |
</p> </p> | |
<div class='vspace'></div><ul><li class='toclink'><a href="Ma <div class='vspace'></div><ul><li class='toclink'><a href="Ma | |
</li><li class='toclink'><a href="Manual/PositioningGameObjec </li><li class='toclink'><a href="Manual/PositioningGameObjec | |
</li><li class='toclink'><a href="Manual/ViewModes.html">View </li><li class='toclink'><a href="Manual/ViewModes.html">View | |
</li><li class='toclink'><a href="Manual/GizmoandIconVisibili </li><li class='toclink'><a href="Manual/GizmoandIconVisibili | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2010-09-06</p> | </p><small>Page last updated: 2010-09-06</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Scene View Navigation'></a><h1>Scene View Naviga <hr><a name='Scene View Navigation'></a><h1>Scene View Naviga | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>The Scene View has a set of navigation controls to help yo <p>The Scene View has a set of navigation controls to help yo | |
</p> </p> | |
<div class='vspace'></div><h2>Arrow Movement</h2> <div class='vspace'></div><h2>Arrow Movement</h2> | |
<p>You can use the <span class='doc-menu'>Arrow Keys</span> t <p>You can use the <span class='doc-menu'>Arrow Keys</span> t | |
</p> </p> | |
<div class='vspace'></div><h2>Focusing</h2> <div class='vspace'></div><h2>Focusing</h2> | |
<p>If you select a GameObject in the hierarchy, then move the <p>If you select a GameObject in the hierarchy, then move the | |
</p> </p> | |
<div class='vspace'></div><h2>Move, Orbit and Zoom</h2> <div class='vspace'></div><h2>Move, Orbit and Zoom</h2> | |
<p>Moving, orbiting and zooming are key operations in Scene V <p>Moving, orbiting and zooming are key operations in Scene V | |
</p> </p> | |
<div class='vspace'></div><h3>Using the Hand Tool</h3> <div class='vspace'></div><h3>Using the Hand Tool</h3> | |
<p>When the hand tool is selected (shortcut: <span class='doc <p>When the hand tool is selected (shortcut: <span class='doc | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Holding down <span class='doc-menu'>Shift</ <p class='vspace'>Holding down <span class='doc-menu'>Shift</ | |
</p> </p> | |
<div class='vspace'></div><h3>Shortcuts Without Using the Han <div class='vspace'></div><h3>Shortcuts Without Using the Han | |
<p>For extra efficiency, all of these controls can also be us <p>For extra efficiency, all of these controls can also be us | |
The most convenient controls depend on which mouse or track-p The most convenient controls depend on which mouse or track-p | |
</p> </p> | |
<div class='vspace'></div><table width='100%'><tr ><th align <div class='vspace'></div><table width='100%'><tr ><th align | |
<tr ><td align='left'><span class='doc-keyword'>Move</span>< <tr ><td align='left'><span class='doc-keyword'>Move</span>< | |
<tr ><td align='left'><span class='doc-keyword'>Orbit</span> <tr ><td align='left'><span class='doc-keyword'>Orbit</span> | |
<tr ><td align='left'><span class='doc-keyword'>Zoom</span>< <tr ><td align='left'><span class='doc-keyword'>Zoom</span>< | |
</table> </table> | |
<div class='vspace'></div><h2>Flythrough Mode </h2> <div class='vspace'></div><h2>Flythrough Mode </h2> | |
<p>The <span class='doc-keyword'>Flythrough</span> mode lets <p>The <span class='doc-keyword'>Flythrough</span> mode lets | |
</p> </p> | |
<div class='vspace'></div><ul><li>Click and hold the right mo <div class='vspace'></div><ul><li>Click and hold the right mo | |
</li><li>Now you can move the view around using the mouse and </li><li>Now you can move the view around using the mouse and | |
</li><li>Holding down <span class='doc-menu'>Shift</span> wil </li><li>Holding down <span class='doc-menu'>Shift</span> wil | |
</li></ul><p class='vspace'>Flythrough mode is designed for < </li></ul><p class='vspace'>Flythrough mode is designed for < | |
</p> </p> | |
<div class='vspace'></div><h2>Scene Gizmo</h2> <div class='vspace'></div><h2>Scene Gizmo</h2> | |
<p>In the upper-right corner of the Scene View is the <span c <p>In the upper-right corner of the Scene View is the <span c | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><div class='specific-u30' style='di | <div class='vspace'></div> | |
<p>You can click on any of the arms to snap the Scene View Ca | <div class='specific-u40' style='display: block;' id='specifi | |
> <p>You can click on any of the arms to snap the Scene View Ca | |
</p></div> </p></div> | |
< | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h3>Mac Trackpad Gestures</h3> <div class='vspace'></div><h3>Mac Trackpad Gestures</h3> | |
<div class='specific-u30' style='display: block;' id='specifi < | |
<p>On a Mac with a trackpad, you can drag with two fingers to < | |
</p></div> < | |
< | |
</p><small>Page last updated: 2012-06-29</p> < | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
function DocLoaded() { | <div class='specific-u40' style='display: block;' id='specifi | |
document.divs = document.getElementsByTagName('div'); | <p>On a Mac with a trackpad, you can drag with two fingers to | |
var prefDesktop = GetCookie('desktopRef'); | </p> | |
var prefiOS = GetCookie('iosRef'); | <p class='vspace'>You can also use three fingers to simulate | |
var prefAndroid = GetCookie('androidRef'); | </p><ul><li>Open System Preferences and then Trackpad (or typ | |
var firstTime = GetCookie('FT'); | </li><li>Click into the "More Gestures" option. | |
if (firstTime == null || firstTime == "" ) { | </li><li>Click the first option labelled "Swipe between pages | |
SetCookie('FT', 'no', 30); | </li></ul></div> | |
SetCookie('desktopRef', 'set', 30) | </p><small>Page last updated: 2012-06-29</p><br/> | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Positioning GameObjects'></a><h1>Positioning Gam <hr><a name='Positioning GameObjects'></a><h1>Positioning Gam | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>When building your games, you'll place lots of different o <p>When building your games, you'll place lots of different o | |
</p> </p> | |
<div class='vspace'></div><h2>Focusing</h2> <div class='vspace'></div><h2>Focusing</h2> | |
<p>It can be useful to focus the Scene View Camera on an obje <p>It can be useful to focus the Scene View Camera on an obje | |
</p> </p> | |
<div class='vspace'></div><h2>Translate, Rotate, and Scale</h <div class='vspace'></div><h2>Translate, Rotate, and Scale</h | |
<p>Use the Transform Tools in the Toolbar to Translate, Rotat <p>Use the Transform Tools in the Toolbar to Translate, Rotat | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><ul><li>Click and drag in the cente <div class='vspace'></div><ul><li>Click and drag in the cente | |
</li><li>At the center of the Translate gizmo, there are thre </li><li>At the center of the Translate gizmo, there are thre | |
</li><li>If you have a three button mouse, you can click the </li><li>If you have a three button mouse, you can click the | |
</li><li>Be careful when using the scaling tool, as non-unifo </li><li>Be careful when using the scaling tool, as non-unifo | |
</li><li>For more information on transforming GameObjects, pl </li><li>For more information on transforming GameObjects, pl | |
</li></ul><div class='vspace'></div><h2>Gizmo Display Toggles </li></ul><div class='vspace'></div><h2>Gizmo Display Toggles | |
<p>The <span class='doc-keyword'>Gizmo Display Toggles</span> <p>The <span class='doc-keyword'>Gizmo Display Toggles</span> | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><ul><li>Position: <div class='vspace'></div><ul><li>Position: | |
<ul><li><span class='doc-menu'>Center</span> will position th <ul><li><span class='doc-menu'>Center</span> will position th | |
</li><li><span class='doc-menu'>Pivot</span> will position th </li><li><span class='doc-menu'>Pivot</span> will position th | |
</li></ul><div class='vspace'></div></li><li>Rotation: </li></ul><div class='vspace'></div></li><li>Rotation: | |
<ul><li><span class='doc-menu'>Local</span> will keep the Giz <ul><li><span class='doc-menu'>Local</span> will keep the Giz | |
</li><li><span class='doc-menu'>Global</span> will clamp the </li><li><span class='doc-menu'>Global</span> will clamp the | |
</li></ul></li></ul><div class='vspace'></div><h2>Unit Snappi </li></ul></li></ul><div class='vspace'></div><h2>Unit Snappi | |
<p>While dragging any Gizmo Axis using the Translate Tool, yo <p>While dragging any Gizmo Axis using the Translate Tool, yo | |
</p> </p> | |
<p class='vspace'>You can change the unit distance that is us <p class='vspace'>You can change the unit distance that is us | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Surface Snapping</h2> <div class='vspace'></div><h2>Surface Snapping</h2> | |
<p>While dragging in the center using the Translate Tool, you <p>While dragging in the center using the Translate Tool, you | |
</p> </p> | |
<div class='vspace'></div><h2>Look-At Rotation</h2> <div class='vspace'></div><h2>Look-At Rotation</h2> | |
<p>While using the Rotate Tool, you can hold <span class='doc <p>While using the Rotate Tool, you can hold <span class='doc | |
</p> </p> | |
<div class='vspace'></div><h2>Vertex Snapping</h2> <div class='vspace'></div><h2>Vertex Snapping</h2> | |
<p>You can assemble your worlds more easily with a feature ca <p>You can assemble your worlds more easily with a feature ca | |
</p> </p> | |
<p class='vspace'>With this you can assemble your worlds real <p class='vspace'>With this you can assemble your worlds real | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Using vertex snapping in Unity is simple. J <p class='vspace'>Using vertex snapping in Unity is simple. J | |
</p> </p> | |
<div class='vspace'></div><ul><li>Select the mesh you want to <div class='vspace'></div><ul><li>Select the mesh you want to | |
</li><li>Press and <b>hold</b> the <span class='doc-menu'>V</ </li><li>Press and <b>hold</b> the <span class='doc-menu'>V</ | |
</li><li>Move your cursor over the vertex on your mesh that y </li><li>Move your cursor over the vertex on your mesh that y | |
</li><li><b>Hold</b> down the left button once your cursor is </li><li><b>Hold</b> down the left button once your cursor is | |
</li><li>Release your mouse button and the <span class='doc-m </li><li>Release your mouse button and the <span class='doc-m | |
</li><li><span class='doc-menu'>Shift-V</span> acts as a togg </li><li><span class='doc-menu'>Shift-V</span> acts as a togg | |
</li><li>You can snap vertex to vertex, vertex to surface and </li><li>You can snap vertex to vertex, vertex to surface and | |
</li></ul><p class='vspace'>A video on how to use vertex snap </li></ul><p class='vspace'>A video on how to use vertex snap | |
</p> </p> | |
</p><small>Page last updated: 2011-10-26</p> | </p><small>Page last updated: 2011-10-26</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='View Modes'></a><h1>View Modes</h1> <hr><a name='View Modes'></a><h1>View Modes</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>The Scene View control bar lets you choose various options <p>The Scene View control bar lets you choose various options | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Draw Mode</h2> <div class='vspace'></div><h2>Draw Mode</h2> | |
<p>The first drop-down menu selects which <span class='doc-ke <p>The first drop-down menu selects which <span class='doc-ke | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Draw Mode drop-down</em> <p><em>Draw Mode drop-down</em> | |
</p> </p> | |
<div class='vspace'></div><ul><li><b>Textured</b>: show surfa <div class='vspace'></div><ul><li><b>Textured</b>: show surfa | |
</li><li><b>Wireframe</b>: draw meshes with a wireframe repre </li><li><b>Wireframe</b>: draw meshes with a wireframe repre | |
</li><li><b>Tex-Wire</b>: show meshes textured and with wiref </li><li><b>Tex-Wire</b>: show meshes textured and with wiref | |
</li><li><b>Render Paths</b>: show the <a href="Manual/Render </li><li><b>Render Paths</b>: show the <a href="Manual/Render | |
</li><li><b>Lightmap Resolution</b>: overlay a checkered grid </li><li><b>Lightmap Resolution</b>: overlay a checkered grid | |
</li></ul><div class='vspace'></div><h2>Render Mode</h2> </li></ul><div class='vspace'></div><h2>Render Mode</h2> | |
<p>The next drop-down along selects which of four <span class <p>The next drop-down along selects which of four <span class | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Render Mode drop-down</em> <p><em>Render Mode drop-down</em> | |
</p> </p> | |
<div class='vspace'></div><ul><li><b>RGB</b>: render the scen <div class='vspace'></div><ul><li><b>RGB</b>: render the scen | |
</li><li><b>Alpha</b>: render colors with alpha. </li><li><b>Alpha</b>: render colors with alpha. | |
</li><li><b>Overdraw</b>: render objects as transparent "silh </li><li><b>Overdraw</b>: render objects as transparent "silh | |
</li><li><b>Mipmaps:</b> show ideal texture sizes using a col </li><li><b>Mipmaps:</b> show ideal texture sizes using a col | |
</li></ul><div class='vspace'></div><h2>Scene Lighting, Game </li></ul><div class='vspace'></div><h2>Scene Lighting, Game | |
<p>To the right of the dropdown menus are three buttons which <p>To the right of the dropdown menus are three buttons which | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>The first button determines whether the vie <p class='vspace'>The first button determines whether the vie | |
</p> </p> | |
</p><small>Page last updated: 2011-11-10</p> | </p><small>Page last updated: 2011-11-10</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Gizmo and Icon Visibility'></a><h1>Gizmo and Ico <hr><a name='Gizmo and Icon Visibility'></a><h1>Gizmo and Ico | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Gizmos and icons have a few display options which can be u <p>Gizmos and icons have a few display options which can be u | |
</p> </p> | |
<div class='vspace'></div><h2>The Icon Selector</h2> <div class='vspace'></div><h2>The Icon Selector</h2> | |
<p>Using the <span class='doc-keyword'>Icon Selector</span>, <p>Using the <span class='doc-keyword'>Icon Selector</span>, | |
</p> </p> | |
<div class='vspace'></div><div class='property-Note'>Note: Wh <div class='vspace'></div><div class='property-Note'>Note: Wh | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Selecting an icon for a GameObject</em> <p><em>Selecting an icon for a GameObject</em> | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Selecting an icon for a script</em> <p><em>Selecting an icon for a script</em> | |
</p> </p> | |
<div class='vspace'></div><h2>Showing and Hiding Icons and Gi <div class='vspace'></div><h2>Showing and Hiding Icons and Gi | |
<p>The visibility of an individual component's gizmos depends <p>The visibility of an individual component's gizmos depends | |
</p> </p> | |
<p class='vspace'>To show the state of the current gizmo and <p class='vspace'>To show the state of the current gizmo and | |
</p> </p> | |
<p class='vspace'>Note that the scripts that show up in the < <p class='vspace'>Note that the scripts that show up in the < | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>The <span class='doc-keyword'>Gizmos dropdown</span>, <p><em>The <span class='doc-keyword'>Gizmos dropdown</span>, | |
</p> </p> | |
<p class='vspace'>The <span class='doc-menu'>Icon Scaling</sp <p class='vspace'>The <span class='doc-menu'>Icon Scaling</sp | |
</p> </p> | |
</p><small>Page last updated: 2011-11-09</p> | </p><small>Page last updated: 2011-11-09</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Searching'></a><h1>Searching</h1> <hr><a name='Searching'></a><h1>Searching</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>When working with large complex scenes it can be useful to <p>When working with large complex scenes it can be useful to | |
</p> </p> | |
<div class='vspace'></div><h2>Scene Search</h2> <div class='vspace'></div><h2>Scene Search</h2> | |
<p>When a scene is loaded in the Editor, you can see the obje <p>When a scene is loaded in the Editor, you can see the obje | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>When a search term filter is active, the Hi <p class='vspace'>When a search term filter is active, the Hi | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Click on a GameObject in the filtered list to see its <p><em>Click on a GameObject in the filtered list to see its | |
</p> </p> | |
<p class='vspace'>When you want to clear the search filter, j <p class='vspace'>When you want to clear the search filter, j | |
</p> </p> | |
<p class='vspace'>In the Scene search you can search either b <p class='vspace'>In the Scene search you can search either b | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Search by Name, Type, or All.</em> <p><em>Search by Name, Type, or All.</em> | |
</p> </p> | |
<div class='vspace'></div><h2>Project Search</h2> <div class='vspace'></div><h2>Project Search</h2> | |
<p>The same fundamentals apply to searching of assets in the <p>The same fundamentals apply to searching of assets in the | |
</p> </p> | |
<p class='vspace'>In the Project search you can search by Nam <p class='vspace'>In the Project search you can search by Nam | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Search by Name, Type, Label, or All.</em> <p><em>Search by Name, Type, Label, or All.</em> | |
</p> </p> | |
<div class='vspace'></div><h2>Object Picker Search</h2> <div class='vspace'></div><h2>Object Picker Search</h2> | |
<p>When assigning an object via the <a href="Manual/EditingRe <p>When assigning an object via the <a href="Manual/EditingRe | |
</p> </p> | |
</p><small>Page last updated: 2011-11-10</p> | </p><small>Page last updated: 2011-11-10</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Prefabs'></a><h1>Prefabs</h1> <hr><a name='Prefabs'></a><h1>Prefabs</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>A <span class='doc-keyword'>Prefab</span> is a type of ass <p>A <span class='doc-keyword'>Prefab</span> is a type of ass | |
</p> </p> | |
<div class='vspace'></div><h2>Creating Prefabs</h2> <div class='vspace'></div><h2>Creating Prefabs</h2> | |
<p>In order to create a Prefab, you must make a new blank Pre <p>In order to create a Prefab, you must make a new blank Pre | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>A new, empty Prefab. It cannot be instanced until you <p><em>A new, empty Prefab. It cannot be instanced until you | |
</p> </p> | |
<p class='vspace'>To fill the Prefab, you use a GameObject th <p class='vspace'>To fill the Prefab, you use a GameObject th | |
</p><ol><li>Choose <span class='doc-menu'>Assets->Create-& </p><ol><li>Choose <span class='doc-menu'>Assets->Create-& | |
</li><li>In <span class='doc-keyword'>Hierarchy View</span>, </li><li>In <span class='doc-keyword'>Hierarchy View</span>, | |
</li><li>Drag & drop the GameObject from the Hierarchy on </li><li>Drag & drop the GameObject from the Hierarchy on | |
</li></ol><p class='vspace'>After you have performed these st </li></ol><p class='vspace'>After you have performed these st | |
</p> </p> | |
<div class='vspace'></div><h2>Prefab Instances</h2> <div class='vspace'></div><h2>Prefab Instances</h2> | |
<p>To create a Prefab instance in the current scene, drag the <p>To create a Prefab instance in the current scene, drag the | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Three of these GameObjects are linked to Prefabs. One <p><em>Three of these GameObjects are linked to Prefabs. One | |
</p> </p> | |
<div class='vspace'></div><ul><li>If you have selected a Pref <div class='vspace'></div><ul><li>If you have selected a Pref | |
</li><li>Information about instantiating prefabs from scripts </li><li>Information about instantiating prefabs from scripts | |
</li></ul><div class='vspace'></div><h3>Inheritance</h3> </li></ul><div class='vspace'></div><h3>Inheritance</h3> | |
<p>Inheritance means that whenever the source Prefab changes, <p>Inheritance means that whenever the source Prefab changes, | |
</p> </p> | |
<p class='vspace'>This allows you to modify Prefab instances <p class='vspace'>This allows you to modify Prefab instances | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><ul><li>If you want to update the s <div class='vspace'></div><ul><li>If you want to update the s | |
<ul><li>Note that the root's position and rotation will <em>n <ul><li>Note that the root's position and rotation will <em>n | |
</li></ul></li><li>If you want to discard all overrides on a </li></ul></li><li>If you want to discard all overrides on a | |
</li></ul><div class='vspace'></div><h2>Imported Prefabs</h2> </li></ul><div class='vspace'></div><h2>Imported Prefabs</h2> | |
<p>When you place a mesh asset into your Assets folder, Unity <p>When you place a mesh asset into your Assets folder, Unity | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>The asset is instantiated in the scene as a <p class='vspace'>The asset is instantiated in the scene as a | |
</p> </p> | |
<div class='vspace'></div><ul><li>When you have selected an i <div class='vspace'></div><ul><li>When you have selected an i | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2012-01-20</p> | </p><small>Page last updated: 2012-01-20</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Lights'></a><h1>Lights</h1> <hr><a name='Lights'></a><h1>Lights</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p><span class='doc-keyword'>Lights</span> are an essential p <p><span class='doc-keyword'>Lights</span> are an essential p | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>A simple, two-light setup</em> <p><em>A simple, two-light setup</em> | |
</p> </p> | |
<p class='vspace'>Lights can be added to your scene from the <p class='vspace'>Lights can be added to your scene from the | |
</p> </p> | |
<p class='vspace'>There are many different options within the <p class='vspace'>There are many different options within the | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Light Component properties in the Inspector</em> <p><em>Light Component properties in the Inspector</em> | |
</p> </p> | |
<p class='vspace'>By simply changing the <span class='doc-pro <p class='vspace'>By simply changing the <span class='doc-pro | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Bright, sunny lights</em> <p><em>Bright, sunny lights</em> | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Dark, medieval lights</em> <p><em>Dark, medieval lights</em> | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Spooky night lights</em> <p><em>Spooky night lights</em> | |
</p> </p> | |
<p class='vspace'>The lights you create this way are <span cl <p class='vspace'>The lights you create this way are <span cl | |
</p> </p> | |
<div class='vspace'></div><h2>Rendering paths</h2> <div class='vspace'></div><h2>Rendering paths</h2> | |
<p>Unity supports different Rendering Paths, these paths affe <p>Unity supports different Rendering Paths, these paths affe | |
For more info about rendering paths you can visit the <a href For more info about rendering paths you can visit the <a href | |
</p> </p> | |
<div class='vspace'></div><h2>More information</h2> <div class='vspace'></div><h2>More information</h2> | |
<p>For more information about using Lights, check the <a href <p>For more information about using Lights, check the <a href | |
</p> </p> | |
</p><small>Page last updated: 2011-10-24</p> | </p><small>Page last updated: 2011-10-24</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Cameras'></a><h1>Cameras</h1> <hr><a name='Cameras'></a><h1>Cameras</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Just as cameras are used in films to display the story to <p>Just as cameras are used in films to display the story to | |
</p> </p> | |
<p class='vspace'>The remaining text is from the <a href="Com <p class='vspace'>The remaining text is from the <a href="Com | |
</p> </p> | |
<div class='vspace'></div><h1>Camera</h1> <div class='vspace'></div><h1>Camera</h1> | |
<p><span class='doc-keyword'>Cameras</span> are the devices t <p><span class='doc-keyword'>Cameras</span> are the devices t | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Clear Flags</sp <tr ><td align='left'><span class='doc-prop'>Clear Flags</sp | |
<tr ><td align='left'><span class='doc-prop'>Background</spa <tr ><td align='left'><span class='doc-prop'>Background</spa | |
<tr ><td align='left'><span class='doc-prop'>Culling Mask</s <tr ><td align='left'><span class='doc-prop'>Culling Mask</s | |
<tr ><td align='left'><span class='doc-prop'>Projection</spa <tr ><td align='left'><span class='doc-prop'>Projection</spa | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Size</span> (wh <tr ><td align='left'><span class='doc-prop'>Size</span> (wh | |
<tr ><td align='left'><span class='doc-prop'>Field of view</ <tr ><td align='left'><span class='doc-prop'>Field of view</ | |
<tr ><td align='left'><span class='doc-prop'>Clipping Planes <tr ><td align='left'><span class='doc-prop'>Clipping Planes | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Normalized View <tr ><td align='left'><span class='doc-prop'>Normalized View | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Depth</span></t <tr ><td align='left'><span class='doc-prop'>Depth</span></t | |
<tr ><td align='left'><span class='doc-prop'>Rendering Path< <tr ><td align='left'><span class='doc-prop'>Rendering Path< | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Target Texture< <tr ><td align='left'><span class='doc-prop'>Target Texture< | |
<tr ><td ><span class='doc-prop'>HDR</span></td><td >Enables <tr ><td ><span class='doc-prop'>HDR</span></td><td >Enables | |
</table> </table> | |
<div class='vspace'></div><h2>Details</h2> <div class='vspace'></div><h2>Details</h2> | |
<p>Cameras are essential for displaying your game to the play <p>Cameras are essential for displaying your game to the play | |
</p> </p> | |
<p class='vspace'>You can create multiple Cameras and assign <p class='vspace'>You can create multiple Cameras and assign | |
</p> </p> | |
<div class='vspace'></div><h3>Render Path</h3> <div class='vspace'></div><h3>Render Path</h3> | |
<p>Unity supports different Rendering Paths. You should choos <p>Unity supports different Rendering Paths. You should choos | |
</p> </p> | |
<p class='vspace'>For more info on rendering paths, check the <p class='vspace'>For more info on rendering paths, check the | |
</p> </p> | |
<div class='vspace'></div><h3>Clear Flags</h3> <div class='vspace'></div><h3>Clear Flags</h3> | |
<p>Each Camera stores color and depth information when it ren <p>Each Camera stores color and depth information when it ren | |
</p> </p> | |
<div class='vspace'></div><h4>Skybox</h4> <div class='vspace'></div><h4>Skybox</h4> | |
<p>This is the default setting. Any empty portions of the sc <p>This is the default setting. Any empty portions of the sc | |
</p> </p> | |
<div class='vspace'></div><h4>Solid Color</h4> <div class='vspace'></div><h4>Solid Color</h4> | |
<p>Any empty portions of the screen will display the current <p>Any empty portions of the screen will display the current | |
</p> </p> | |
<div class='vspace'></div><h4>Depth Only</h4> <div class='vspace'></div><h4>Depth Only</h4> | |
<p>If you wanted to draw a player's gun without letting it ge <p>If you wanted to draw a player's gun without letting it ge | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h4>Don't Clear</h4> <div class='vspace'></div><h4>Don't Clear</h4> | |
<p>This mode does not clear either the color or the depth buf <p>This mode does not clear either the color or the depth buf | |
</p> </p> | |
<div class='vspace'></div><h3>Clip Planes</h3> <div class='vspace'></div><h3>Clip Planes</h3> | |
<p>The <span class='doc-prop'>Near</span> and <span class='do <p>The <span class='doc-prop'>Near</span> and <span class='do | |
</p> </p> | |
<p class='vspace'>The clipping planes also determine how dept <p class='vspace'>The clipping planes also determine how dept | |
</p> </p> | |
<p class='vspace'>Note that the near and far clip planes toge <p class='vspace'>Note that the near and far clip planes toge | |
</p> </p> | |
<p class='vspace'>For performance reasons, you might want to <p class='vspace'>For performance reasons, you might want to | |
</p> </p> | |
<div class='vspace'></div><h3>Culling Mask</h3> <div class='vspace'></div><h3>Culling Mask</h3> | |
<p>The <span class='doc-prop'>Culling Mask</span> is used for <p>The <span class='doc-prop'>Culling Mask</span> is used for | |
</p> </p> | |
<p class='vspace'>Commonly, it is good practice to put your U <p class='vspace'>Commonly, it is good practice to put your U | |
</p> </p> | |
<p class='vspace'>In order for the UI to display on top of th <p class='vspace'>In order for the UI to display on top of th | |
</p> </p> | |
<div class='vspace'></div><h3>Normalized Viewport Rectangle</ <div class='vspace'></div><h3>Normalized Viewport Rectangle</ | |
<p><span class='doc-prop'>Normalized Viewport Rectangles</spa <p><span class='doc-prop'>Normalized Viewport Rectangles</spa | |
</p> </p> | |
<p class='vspace'>It's easy to create a two-player split scre <p class='vspace'>It's easy to create a two-player split scre | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h3>Orthographic</h3> <div class='vspace'></div><h3>Orthographic</h3> | |
<p>Marking a Camera as <span class='doc-prop'>Orthographic</s <p>Marking a Camera as <span class='doc-prop'>Orthographic</s | |
</p> </p> | |
<p class='vspace'>Note that fog is rendered uniformly in orth <p class='vspace'>Note that fog is rendered uniformly in orth | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h3>Render Texture </h3> <div class='vspace'></div><h3>Render Texture </h3> | |
<p>This feature is only available for Unity Advanced licenses <p>This feature is only available for Unity Advanced licenses | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>Cameras can be instantiated, parented, and scripted j <ul><li>Cameras can be instantiated, parented, and scripted j | |
</li><li>To increase the sense of speed in a racing game, use </li><li>To increase the sense of speed in a racing game, use | |
</li><li>Cameras can be used in physics simulation if you add </li><li>Cameras can be used in physics simulation if you add | |
</li><li>There is no limit to the number of Cameras you can h </li><li>There is no limit to the number of Cameras you can h | |
</li><li>Orthographic cameras are great for making 3D user in </li><li>Orthographic cameras are great for making 3D user in | |
</li><li>If you are experiencing depth artifacts (surfaces cl </li><li>If you are experiencing depth artifacts (surfaces cl | |
</li><li>Cameras cannot render to the Game Screen and a Rende </li><li>Cameras cannot render to the Game Screen and a Rende | |
</li><li>Pro license holders have the option of rendering a C </li><li>Pro license holders have the option of rendering a C | |
</li><li>Unity comes with pre-installed Camera scripts, found </li><li>Unity comes with pre-installed Camera scripts, found | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2007-11-16</p> | </p><small>Page last updated: 2007-11-16</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Terrains'></a><h1>Terrains</h1> <hr><a name='Terrains'></a><h1>Terrains</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>This section will explain how to use the <span class='doc- <p>This section will explain how to use the <span class='doc- | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/terrain-Usi <div class='vspace'></div><h2><a href="Components/terrain-Usi | |
<p>This section covers the most basic information about using <p>This section covers the most basic information about using | |
</p> </p> | |
<div class='vspace'></div><div><a href="Components/terrain-Us <div class='vspace'></div><div><a href="Components/terrain-Us | |
<div class='vspace'></div><h2><a href="Components/terrain-Hei <div class='vspace'></div><h2><a href="Components/terrain-Hei | |
<p>This section explains how to use the different tools and b <p>This section explains how to use the different tools and b | |
</p> </p> | |
<div class='vspace'></div><div><a href="Components/terrain-He <div class='vspace'></div><div><a href="Components/terrain-He | |
<div class='vspace'></div><h2><a href="Components/terrain-Tex <div class='vspace'></div><h2><a href="Components/terrain-Tex | |
<p>This section explains how to add, paint and blend Terrain <p>This section explains how to add, paint and blend Terrain | |
</p> </p> | |
<div class='vspace'></div><div><a href="Components/terrain-Te <div class='vspace'></div><div><a href="Components/terrain-Te | |
<div class='vspace'></div><h2><a href="Components/terrain-Tre <div class='vspace'></div><h2><a href="Components/terrain-Tre | |
<p>This section contains important information for creating y <p>This section contains important information for creating y | |
</p> </p> | |
<div class='vspace'></div><div><a href="Components/terrain-Tr <div class='vspace'></div><div><a href="Components/terrain-Tr | |
<div class='vspace'></div><h2><a href="Components/terrain-Gra <div class='vspace'></div><h2><a href="Components/terrain-Gra | |
<p>This section explains how grass works, and how to use it. <p>This section explains how grass works, and how to use it. | |
</p> </p> | |
<div class='vspace'></div><div><a href="Components/terrain-Gr <div class='vspace'></div><div><a href="Components/terrain-Gr | |
<div class='vspace'></div><h2><a href="Components/terrain-Det <div class='vspace'></div><h2><a href="Components/terrain-Det | |
<p>This section explains practical usage for detail meshes li <p>This section explains practical usage for detail meshes li | |
</p> </p> | |
<div class='vspace'></div><div><a href="Components/terrain-De <div class='vspace'></div><div><a href="Components/terrain-De | |
<p class='vspace'><a name='Lightmapping' id='Lightmapping'></ <p class='vspace'><a name='Lightmapping' id='Lightmapping'></ | |
</p><h2><a href="Manual/Lightmapping.html">Lightmaps</a></h2> </p><h2><a href="Manual/Lightmapping.html">Lightmaps</a></h2> | |
<p>You can lightmap terrains just like any other objects usin <p>You can lightmap terrains just like any other objects usin | |
</p> </p> | |
<div class='vspace'></div><div><a href="Manual/Lightmapping.h <div class='vspace'></div><div><a href="Manual/Lightmapping.h | |
<div class='vspace'></div><h2><a href="Components/terrain-Oth <div class='vspace'></div><h2><a href="Components/terrain-Oth | |
<p>This section covers all the other settings associated with <p>This section covers all the other settings associated with | |
</p> </p> | |
<a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i | <div class='vspace'></div><h2>Mobile performance note</h2> | |
<div class='specific-ios' style='display: block;' id='specifi | <p>Rendering terrain is quite expensive, so terrain engine is | |
<p>Due to performance hit, Terrain Engine usage is discourage | </p> | |
</p></div> | </p><small>Page last updated: 2010-06-03</p><br/> | |
<a class='androidRef' id='androidRef' href="javascript:ShowHi < | |
<div class='specific-android' style='display: block;' id='spe < | |
<p>Due to performance hit, Terrain Engine usage is discourage < | |
</p></div> < | |
</p><small>Page last updated: 2010-06-03</p> < | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Asset Import and Creation'></a><h1>Asset Import <hr><a name='Asset Import and Creation'></a><h1>Asset Import | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>A large part of making a game is utilizing your asset sour <p>A large part of making a game is utilizing your asset sour | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>This view shows the organization of files i <p class='vspace'>This view shows the organization of files i | |
</p> </p> | |
<p class='vspace'>To import an asset file into your project, <p class='vspace'>To import an asset file into your project, | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>It is always a good idea to add labels to your assets <ul><li>It is always a good idea to add labels to your assets | |
</li><li>When backing up a project folder <b>always</b> back </li><li>When backing up a project folder <b>always</b> back | |
</li><li>Rename and move files to your heart's content inside </li><li>Rename and move files to your heart's content inside | |
</li><li><b>Never</b> rename or move anything from the Finder </li><li><b>Never</b> rename or move anything from the Finder | |
</li></ul><p class='vspace'>Continue reading for more informa </li></ul><p class='vspace'>Continue reading for more informa | |
</p> </p> | |
<div class='vspace'></div><ul><li class='toclink'><a href="Ma <div class='vspace'></div><ul><li class='toclink'><a href="Ma | |
</li><li class='toclink'><a href="Manual/Meshes.html">Meshes< </li><li class='toclink'><a href="Manual/Meshes.html">Meshes< | |
</li></ul><div class='specific-u30' style='display: block;' i | </li></ul> | |
<ul><li class='toclink'><a href="Manual/Animations.html">Anim | <div class='specific-u40' style='display: block;' id='specifi | |
</li></ul></div> | <ul><li class='toclink'><a href="Manual/Animations40.html">An | |
| </li><li class='toclink'><a href="Manual/Splittinganimations. | |
> </li><li class='toclink'><a href="Manual/MecanimAnimationSyst | |
> <ul><li class='toclink'><a href="Manual/AvatarCreationandSetu | |
> <ul><li class='toclink'><a href="Manual/CreatingtheAvatar.htm | |
> </li><li class='toclink'><a href="Manual/ConfiguringtheAvatar | |
> </li><li class='toclink'><a href="Manual/MuscleDefinitions.ht | |
> </li><li class='toclink'><a href="Manual/AvatarBodyMask.html" | |
> </li></ul></li><li class='toclink'><a href="Manual/InverseKin | |
> </li><li class='toclink'><a href="Manual/AnimationStateMachin | |
> <ul><li class='toclink'><a href="Manual/AnimationStates.html" | |
> </li><li class='toclink'><a href="Manual/AnimationTransitions | |
> </li><li class='toclink'><a href="Manual/AnimationEvents.html | |
> </li></ul></li><li class='toclink'><a href="Manual/AnimationS | |
> </li><li class='toclink'><a href="Manual/AnimationBlendTrees. | |
> </li><li class='toclink'><a href="Manual/AnimationLayers.html | |
> </li><li class='toclink'><a href="Manual/ScriptingRootMotion. | |
> </li></ul></li></ul></div> | |
<ul><li class='toclink'><a href="Manual/Materials.html">Mater <ul><li class='toclink'><a href="Manual/Materials.html">Mater | |
</li><li class='toclink'><a href="Manual/Textures.html">Textu </li><li class='toclink'><a href="Manual/Textures.html">Textu | |
</li><li class='toclink'><a href="Manual/ProceduralMaterials. </li><li class='toclink'><a href="Manual/ProceduralMaterials. | |
</li><li class='toclink'><a href="Manual/VideoFiles.html">Mov </li><li class='toclink'><a href="Manual/VideoFiles.html">Mov | |
</li><li class='toclink'><a href="Manual/AudioFiles.html">Aud </li><li class='toclink'><a href="Manual/AudioFiles.html">Aud | |
<ul><li class='toclink'><a href="Manual/TrackerModules.html"> <ul><li class='toclink'><a href="Manual/TrackerModules.html"> | |
</li></ul></li><li class='toclink'><a href="Manual/Scripting. </li></ul></li><li class='toclink'><a href="Manual/Scripting. | |
</li><li class='toclink'><a href="Manual/AssetStore.html">Ass </li><li class='toclink'><a href="Manual/AssetStore.html">Ass | |
</li><li class='toclink'><a href="Manual/AssetServer.html">As </li><li class='toclink'><a href="Manual/AssetServer.html">As | |
<ul><li class='toclink'><a href="Manual/AssetCacheServer.html <ul><li class='toclink'><a href="Manual/AssetCacheServer.html | |
</li><li class='toclink'><a href="Manual/CacheServerFAQ.html" </li><li class='toclink'><a href="Manual/CacheServerFAQ.html" | |
</li></ul></li><li class='toclink'><a href="Manual/BehindtheS </li></ul></li><li class='toclink'><a href="Manual/BehindtheS | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2012-01-08</p> | </p><small>Page last updated: 2012-01-08</p><br/> | |
<script type="text/javascript"> | <hr><a name='Importing Assets'></a><h1>Importing Assets</h1> | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Importing Assets'></a><h1>Importing Assets</h1> < | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity will automatically detect files as they are added to <p>Unity will automatically detect files as they are added to | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>When you are organizing your Project View, <p class='vspace'>When you are organizing your Project View, | |
</p> </p> | |
<div class='vspace'></div><h3><span style='color: red;'> Nev <div class='vspace'></div><h3><span style='color: red;'> Nev | |
<p>There is a lot of meta data stored about relationships bet <p>There is a lot of meta data stored about relationships bet | |
</p> </p> | |
<p class='vspace'>So just remember to only save assets to the <p class='vspace'>So just remember to only save assets to the | |
</p> </p> | |
<div class='vspace'></div><h2>Creating and Updating Assets</h <div class='vspace'></div><h2>Creating and Updating Assets</h | |
<p>When you are building a game and you want to add a new ass <p>When you are building a game and you want to add a new ass | |
</p> </p> | |
<p class='vspace'>Additionally, as you update and save your a <p class='vspace'>Additionally, as you update and save your a | |
</p> </p> | |
<div class='vspace'></div><h2>Asset Types</h2> <div class='vspace'></div><h2>Asset Types</h2> | |
<p>There are a handful of basic asset types that will go into <p>There are a handful of basic asset types that will go into | |
</p> </p> | |
<div class='vspace'></div><ul><li>Mesh Files & Animations <div class='vspace'></div><ul><li>Mesh Files & Animations | |
</li><li>Texture Files </li><li>Texture Files | |
</li><li>Sound Files </li><li>Sound Files | |
</li></ul><p class='vspace'>We'll discuss the details of impo </li></ul><p class='vspace'>We'll discuss the details of impo | |
</p> </p> | |
<div class='vspace'></div><h3>Meshes & Animations</h3> <div class='vspace'></div><h3>Meshes & Animations</h3> | |
<p>Whichever 3D package you are using, Unity will import the <p>Whichever 3D package you are using, Unity will import the | |
</p> </p> | |
<p class='vspace'>Your mesh file does not need to have an ani | <p class='vspace'>Your mesh file does not need to have an ani | |
</p> </p> | |
<p class='vspace'>Once your mesh is imported into Unity, you <p class='vspace'>Once your mesh is imported into Unity, you | |
</p> </p> | |
<p class='vspace'>Meshes will be imported with UVs and a numb <p class='vspace'>Meshes will be imported with UVs and a numb | |
</p> </p> | |
<div class='vspace'></div><h3>Textures</h3> <div class='vspace'></div><h3>Textures</h3> | |
<p>Unity supports all image formats. Even when working with <p>Unity supports all image formats. Even when working with | |
</p> </p> | |
<p class='vspace'>You should make your textures in dimensions <p class='vspace'>You should make your textures in dimensions | |
</p> </p> | |
<p class='vspace'>Once your texture has been imported, you sh <p class='vspace'>Once your texture has been imported, you sh | |
</p> </p> | |
<div class='vspace'></div><h3>Sounds</h3> <div class='vspace'></div><h3>Sounds</h3> | |
<a class='desktopRef' id='desktopRef' href="javascript:ShowHi <a class='desktopRef' id='desktopRef' href="javascript:ShowHi | |
<div class='specific-desktop' style='display: block;' id='spe <div class='specific-desktop' style='display: block;' id='spe | |
<p>Unity features support for two types of audio: <span class <p>Unity features support for two types of audio: <span class | |
</p> </p> | |
<div class='vspace'></div><h3>File Type Conversion</h3> <div class='vspace'></div><h3>File Type Conversion</h3> | |
<table width='100%'><tr ><td align='left'><span class='doc-p <table width='100%'><tr ><td align='left'><span class='doc-p | |
<tr ><td align='left'><span class='doc-prop'>.WAV</span></td <tr ><td align='left'><span class='doc-prop'>.WAV</span></td | |
<tr ><td align='left'><span class='doc-prop'>.MP3</span></td <tr ><td align='left'><span class='doc-prop'>.MP3</span></td | |
<tr ><td align='left'><span class='doc-prop'>.OGG</span></td <tr ><td align='left'><span class='doc-prop'>.OGG</span></td | |
</table> </table> | |
<div class='vspace'></div><h3>Import Settings</h3> <div class='vspace'></div><h3>Import Settings</h3> | |
<p>If you are importing a file that is not already compressed <p>If you are importing a file that is not already compressed | |
</p> </p> | |
<p class='vspace'>Read more about using Ogg Vorbis or Uncompr <p class='vspace'>Read more about using Ogg Vorbis or Uncompr | |
</p></div> </p></div> | |
<a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i <a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i | |
<div class='specific-ios' style='display: block;' id='specifi <div class='specific-ios' style='display: block;' id='specifi | |
<p>Unity features support for two types of audio: <span class <p>Unity features support for two types of audio: <span class | |
</p> </p> | |
<div class='vspace'></div><h4>File Type Conversion</h4> <div class='vspace'></div><h4>File Type Conversion</h4> | |
<table width='100%'><tr ><td align='left'><span class='doc-p <table width='100%'><tr ><td align='left'><span class='doc-p | |
<tr ><td align='left'><span class='doc-prop'>.WAV</span></td <tr ><td align='left'><span class='doc-prop'>.WAV</span></td | |
<tr ><td align='left'><span class='doc-prop'>.MP3</span></td <tr ><td align='left'><span class='doc-prop'>.MP3</span></td | |
<tr ><td align='left'><span class='doc-prop'>.OGG</span></td <tr ><td align='left'><span class='doc-prop'>.OGG</span></td | |
</table> </table> | |
<div class='vspace'></div><h4>Import Settings</h4> <div class='vspace'></div><h4>Import Settings</h4> | |
<p>When you are importing an audio file, you can select its f <p>When you are importing an audio file, you can select its f | |
</p> </p> | |
<p class='vspace'>Read more about using MP3 Compressed or Unc <p class='vspace'>Read more about using MP3 Compressed or Unc | |
</p></div> </p></div> | |
<a class='androidRef' id='androidRef' href="javascript:ShowHi <a class='androidRef' id='androidRef' href="javascript:ShowHi | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<p>Unity features support for two types of audio: <span class <p>Unity features support for two types of audio: <span class | |
</p> </p> | |
<div class='vspace'></div><h4>File Type Conversion</h4> <div class='vspace'></div><h4>File Type Conversion</h4> | |
<table width='100%'><tr ><td align='left'><span class='doc-p <table width='100%'><tr ><td align='left'><span class='doc-p | |
<tr ><td align='left'><span class='doc-prop'>.WAV</span></td <tr ><td align='left'><span class='doc-prop'>.WAV</span></td | |
<tr ><td align='left'><span class='doc-prop'>.MP3</span></td <tr ><td align='left'><span class='doc-prop'>.MP3</span></td | |
<tr ><td align='left'><span class='doc-prop'>.OGG</span></td <tr ><td align='left'><span class='doc-prop'>.OGG</span></td | |
</table> </table> | |
<div class='vspace'></div><h4>Import Settings</h4> <div class='vspace'></div><h4>Import Settings</h4> | |
<p>When you are importing an audio file, you can select its f <p>When you are importing an audio file, you can select its f | |
</p> </p> | |
<p class='vspace'>Read more about using MP3 Compressed or Unc <p class='vspace'>Read more about using MP3 Compressed or Unc | |
</p></div> </p></div> | |
<p class='vspace'>Once sound files are imported, they can be <p class='vspace'>Once sound files are imported, they can be | |
</p> </p> | |
</p><small>Page last updated: 2011-11-10</p> | </p><small>Page last updated: 2011-11-10</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Meshes'></a><h1>Meshes</h1> <hr><a name='Meshes'></a><h1>Meshes</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>At the core of any 3D game are <span class='doc-keyword'>M <p>At the core of any 3D game are <span class='doc-keyword'>M | |
</p> </p> | |
<p class='vspace'>Meshes in Unity are rendered with <span cla <p class='vspace'>Meshes in Unity are rendered with <span cla | |
</p><ul><li>The renderer displays the mesh at the <span class </p><ul><li>The renderer displays the mesh at the <span class | |
</li><li>The appearance of the mesh is controlled through the </li><li>The appearance of the mesh is controlled through the | |
</li></ul><div class='vspace'></div><div><img class='figure' </li></ul><div class='vspace'></div><div><img class='figure' | |
<div class='vspace'></div><h1>Meshes</h1> <div class='vspace'></div><h1>Meshes</h1> | |
<p><span class='doc-keyword'>Meshes</span> make up a large pa <p><span class='doc-keyword'>Meshes</span> make up a large pa | |
</p> </p> | |
<div class='vspace'></div><ul><li><a href="Manual/HOWTO-Impor <div class='vspace'></div><ul><li><a href="Manual/HOWTO-Impor | |
</li><li><a href="Manual/HOWTO-ImportObjectCinema4D.html">Cin </li><li><a href="Manual/HOWTO-ImportObjectCinema4D.html">Cin | |
</li><li><a href="Manual/HOWTO-ImportObjectMax.html">3ds Max< </li><li><a href="Manual/HOWTO-ImportObjectMax.html">3ds Max< | |
</li><li><a href="Manual/HOWTO-ImportObjectCheetah3D.html">Ch </li><li><a href="Manual/HOWTO-ImportObjectCheetah3D.html">Ch | |
</li><li><a href="Manual/HOWTO-ImportObjectModo.html">Modo</a </li><li><a href="Manual/HOWTO-ImportObjectModo.html">Modo</a | |
</li><li><a href="Manual/HOWTO-importObjectLightwave.html">Li </li><li><a href="Manual/HOWTO-importObjectLightwave.html">Li | |
</li><li><a href="Manual/HOWTO-ImportObjectBlender.html">Blen </li><li><a href="Manual/HOWTO-ImportObjectBlender.html">Blen | |
</li></ul><div class='vspace'></div><h2>Other applications</h </li></ul><div class='vspace'></div><h2>Other applications</h | |
<p>Unity can read <b>.FBX</b>, <b>.dae</b> (Collada), <b>.3DS <p>Unity can read <b>.FBX</b>, <b>.dae</b> (Collada), <b>.3DS | |
</p> </p> | |
<div class='vspace'></div><h2>Textures</h2> <div class='vspace'></div><h2>Textures</h2> | |
<p>Unity will attempt to find the textures used by a mesh aut <p>Unity will attempt to find the textures used by a mesh aut | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Import settings.</h2> <div class='vspace'></div><h2>Import settings.</h2> | |
<p>The <span class='doc-keyword'>Import Settings</span> for a <p>The <span class='doc-keyword'>Import Settings</span> for a | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><b><em>Meshes</em></b></td></tr> <tr ><td align='left'><b><em>Meshes</em></b></td></tr> | |
<tr ><td align='left'><span class='doc-prop'>Scale Factor</s <tr ><td align='left'><span class='doc-prop'>Scale Factor</s | |
<tr ><td align='left'><span class='doc-prop'>Use File Units< <tr ><td align='left'><span class='doc-prop'>Use File Units< | |
<tr ><td align='left'><span class='doc-prop'>Mesh Compressio <tr ><td align='left'><span class='doc-prop'>Mesh Compressio | |
<tr ><td ><span class='doc-prop'>Mesh Optimization</span></td <tr ><td ><span class='doc-prop'>Mesh Optimization</span></td | |
<tr ><td align='left'><span class='doc-prop'>Generate Collid <tr ><td align='left'><span class='doc-prop'>Generate Collid | |
<tr ><td align='left'><span class='doc-prop'>Swap UVs</span> <tr ><td align='left'><span class='doc-prop'>Swap UVs</span> | |
<tr ><td align='left'><span class='doc-prop'>Generate Lightm <tr ><td align='left'><span class='doc-prop'>Generate Lightm | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><b><em>Normals & Tangents</em></b> <tr ><td align='left'><b><em>Normals & Tangents</em></b> | |
<tr ><td align='left'><span class='doc-prop'>Normals</span>< <tr ><td align='left'><span class='doc-prop'>Normals</span>< | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Tangents</span> <tr ><td align='left'><span class='doc-prop'>Tangents</span> | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Smoothing Angle <tr ><td align='left'><span class='doc-prop'>Smoothing Angle | |
<tr ><td align='left'><span class='doc-prop'>Split Tangents< <tr ><td align='left'><span class='doc-prop'>Split Tangents< | |
<tr ><td align='left'><b><em>Materials</em></b></td></tr> <tr ><td align='left'><b><em>Materials</em></b></td></tr> | |
<tr ><td align='left'><span class='doc-prop'>Import Material <tr ><td align='left'><span class='doc-prop'>Import Material | |
<tr ><td align='left'><span class='doc-prop'>Material Naming <tr ><td align='left'><span class='doc-prop'>Material Naming | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Material Search <tr ><td align='left'><span class='doc-prop'>Material Search | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><b><em>Animations</em></b></td></tr> <tr ><td align='left'><b><em>Animations</em></b></td></tr> | |
<tr ><td align='left'><span class='doc-prop'>Generation</spa <tr ><td align='left'><span class='doc-prop'>Generation</spa | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Bake Animations <tr ><td align='left'><span class='doc-prop'>Bake Animations | |
<tr ><td align='left'><span class='doc-prop'>Animation Wrap <tr ><td align='left'><span class='doc-prop'>Animation Wrap | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td align='left'><span class='doc-prop'>Split Animation <tr ><td align='left'><span class='doc-prop'>Split Animation | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td align='left'><b><em>Animation Compression</em></b>< <tr ><td align='left'><b><em>Animation Compression</em></b>< | |
<tr ><td align='left'><span class='doc-prop'>Anim. Compressi <tr ><td align='left'><span class='doc-prop'>Anim. Compressi | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Animation Compr <tr ><td align='left'><span class='doc-prop'>Animation Compr | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table> </table> | |
<div class='vspace'></div><h3>Material Generation and Assignm <div class='vspace'></div><h3>Material Generation and Assignm | |
<p>For each imported material Unity will apply the following <p>For each imported material Unity will apply the following | |
</p> </p> | |
<p class='vspace'>If material generation is disabled (i.e. <s <p class='vspace'>If material generation is disabled (i.e. <s | |
</p><ul><li>Unity will pick a name for the Unity material bas </p><ul><li>Unity will pick a name for the Unity material bas | |
</li><li>Unity will try to find an existing material with tha </li><li>Unity will try to find an existing material with tha | |
</li><li>If Unity succeeds in finding an existing material th </li><li>If Unity succeeds in finding an existing material th | |
</li></ul><p class='vspace'><a name='colliders' id='colliders </li></ul><p class='vspace'><a name='colliders' id='colliders | |
</p><h3>Colliders</h3> </p><h3>Colliders</h3> | |
<p>Unity uses two main types of colliders: <span class='doc-k <p>Unity uses two main types of colliders: <span class='doc-k | |
</p> </p> | |
<p class='vspace'>If you are moving the object around (a car <p class='vspace'>If you are moving the object around (a car | |
</p> </p> | |
<div class='vspace'></div><h3>Animations</h3> <div class='vspace'></div><h3>Animations</h3> | |
<p>Animations are automatically imported from the scene. For | <p>Animations are automatically imported from the scene. For | |
</p> </p> | |
<div class='vspace'></div><h3>Normal mapping and characters</ <div class='vspace'></div><h3>Normal mapping and characters</ | |
<p>If you have a character with a normal map that was generat <p>If you have a character with a normal map that was generat | |
</p> </p> | |
<p class='vspace'>If you are converting a greyscale image int <p class='vspace'>If you are converting a greyscale image int | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>Merge your meshes together as much as possible. Make <ul><li>Merge your meshes together as much as possible. Make | |
</li><li>If you need to set up your objects further in Unity </li><li>If you need to set up your objects further in Unity | |
</li><li>Make your meshes be centered on the world origin in </li><li>Make your meshes be centered on the world origin in | |
</li></ul><div class='vspace'></div><h3>The Unity Editor show | </li></ul><div class='vspace'></div><h3>The Unity Editor show | |
<p>This is correct. What you are looking at is the number of | <p>This is correct. What you are looking at is the number of | |
Previously Unity would report triangle counts incorrectly. Th < | |
</p> </p> | |
<div class='vspace'></div><h2>See Also</h2> <div class='vspace'></div><h2>See Also</h2> | |
<ul><li><a href="Manual/ModelingOptimizedCharacters.html">Mod <ul><li><a href="Manual/ModelingOptimizedCharacters.html">Mod | |
</li><li><a href="Manual/HOWTO-bumpmap.html">How do I use nor </li><li><a href="Manual/HOWTO-bumpmap.html">How do I use nor | |
</li><li><a href="Manual/HOWTO-FixZAxisIsUp.html">How do I fi </li><li><a href="Manual/HOWTO-FixZAxisIsUp.html">How do I fi | |
</li></ul><div class='vspace'></div> </li></ul><div class='vspace'></div> | |
</p><small>Page last updated: 2012-01-19</p> | </p><small>Page last updated: 2012-01-19</p><br/> | |
<script type="text/javascript"> | <hr><a name='Importing Animations'></a><h1>Importing Animatio | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Animations'></a><h1>Animations</h1> < | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity's Animation System allows you to create beautifully <p>Unity's Animation System allows you to create beautifully | |
</p> </p> | |
<p class='vspace'>There are some best practices for creating | <p class='vspace'>For best practices on creating a rigged cha | |
</p> </p> | |
<p class='vspace'>The following topics are covered on this pa | <p class='vspace'>The following topics are covered on this pa | |
</p> </p> | |
<div class='vspace'></div><ul><li><a href='#ImportAnim'>Impor <div class='vspace'></div><ul><li><a href='#ImportAnim'>Impor | |
<ul><li><a href='#ImportSplit'>Animation Splitting</a> | <ul><li><a href='#ImportIK'>Inverse Kinematics</a> | |
</li><li><a href='#ImportFile'>Multiple Files</a> | </li><li><a href='#ImportModelNoAnims'>Adding animations to m | |
</li><li><a href='#ImportIK'>Inverse Kinematics</a> < | |
</li></ul></li><li><a href='#IntoScene'>Inserting Into a Unit </li></ul></li><li><a href='#IntoScene'>Inserting Into a Unit | |
</li></ul><p class='vspace'>You can download an <a class='url | </li></ul><p class='vspace'><a name='ImportAnim' id='ImportAn | |
</p> < | |
<p class='vspace'><a name='ImportAnim' id='ImportAnim'></a> < | |
</p> </p> | |
<div class='vspace'></div><h2>Importing The Animations</h2> <div class='vspace'></div><h2>Importing The Animations</h2> | |
<p>First of all we have to import the character. Unity nativ <p>First of all we have to import the character. Unity nativ | |
> To import the animations you simply place the model in the <s | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'><a href="Manual/Splittinganimations.html">S | |
> </p> | |
> <p class='vspace'><a name='ImportIK' id='ImportIK'></a> | |
> </p> | |
> <div class='vspace'></div><h3>Importing Inverse Kinematics</h | |
> <p>When importing animated characters from Maya that are crea | |
> </p> | |
> <p class='vspace'><a name='IntoScene' id='IntoScene'></a> | |
> </p> | |
> <div class='vspace'></div><h2>Bringing the character into the | |
> <p>When you have imported your model you drag the object from | |
> </p><div><img class='figure' src='Images/manual/Animations40- | |
> <p class='vspace'>The character above has three animations in | |
</p> </p> | |
<p class='vspace'><a name='ImportSplit' id='ImportSplit'></a> | <div class='vspace'></div><div class='property-TIP'>TIP: You | |
> </p><small>Page last updated: 2012-08-09</p><br/> | |
> <hr><a name='Splitting animations'></a><h1>Splitting animatio | |
> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
> <h2>Working with models that have pre-split animations</h2> | |
> <p>The simplest types of models to work with are those that c | |
> </p><div><img class='figure' src='Images/manual/Splittinganim | |
> <p class='vspace'>You will see a list of available clips, whi | |
</p> </p> | |
<div class='vspace'></div><h3>Importing Animations using Anim | <div class='vspace'></div><h3>Working with models with unspli | |
<p>The most convenient way for animators to work is to have a | <p>Another type of model you might encounter is a single mode | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>In this case, you can define which frames m | |
</p> </p> | |
<p class='vspace'>For example: <p class='vspace'>For example: | |
</p><ul><li>walk animation during frames 1 - 33 </p><ul><li>walk animation during frames 1 - 33 | |
</li><li>run animation during frames 41 - 57 </li><li>run animation during frames 41 - 57 | |
</li><li>kick animation during frames 81 - 97 </li><li>kick animation during frames 81 - 97 | |
</li></ul><p class='vspace'>To import the animations you simp | </li></ul><div class='vspace'></div><div><img class='figure' | |
</p> < | |
<div class='vspace'></div><div><img class='figure' src='Image < | |
<p class='vspace'>In the Import Settings, the <span class='do <p class='vspace'>In the Import Settings, the <span class='do | |
</p> </p> | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><span class='doc-prop'>name</span></td <tr ><td align='left'><span class='doc-prop'>name</span></td | |
<tr ><td align='left'><span class='doc-prop'>start frame</sp | <tr ><td align='left'><span class='doc-prop'>Start</span></t | |
<tr ><td align='left'><span class='doc-prop'>stop frame</spa | <tr ><td align='left'><span class='doc-prop'>End</span></td> | |
<tr ><td align='left'><span class='doc-prop'>WrapMode</span> | <tr ><td align='left'><span class='doc-prop'>Wrap Mode</span | |
<tr ><td align='left'><span class='doc-prop'>loop frame</spa | <tr ><td align='left'><span class='doc-prop'>Add Loop Frame< | |
</table> | </table> | |
<p class='vspace'><a name='ImportFile' id='ImportFile'></a> | <div class='vspace'></div><h2>Working with animation clips fo | |
> <div><img class='figure' src='Images/manual/Splittinganimatio | |
> <div class='vspace'></div><table width='100%'><tr class='tabl | |
> <tr ><td align='left'><span class='doc-prop'>Lock Pose</span | |
> <tr ><td align='left'><span class='doc-prop'>Lock Root Rotat | |
> <tr ><td align='left'><span class='doc-prop'>Lock Height</sp | |
> <tr ><td align='left'><span class='doc-prop'>Lock Root Posit | |
> <tr ><td align='left'><span class='doc-prop'>Rotation Offset | |
> <tr ><td align='left'><span class='doc-prop'>Cycle Offset</s | |
> <tr ><td align='left'><span class='doc-prop'>Mirror</span></ | |
> <tr ><td ><span class='doc-prop'>Body Mask</span></td><td >Th | |
> <tr ><td ><span class='doc-prop'>Curves</span></td><td >Param | |
> </table> | |
> <p class='vspace'><a name='ImportModelNoAnims' id='ImportMode | |
> </p> | |
> <div class='vspace'></div><h2>Adding animations to models tha | |
> <p><em>For models without muscle definitions (non-Mecanim)</e | |
> <em>For models that have muscle definitions (Mecanim)</em>, t | |
> </p><ul><li>Create a <span class='doc-prop'>New Animator Cont | |
> </li><li>Open the <span class='doc-inspector'>Animator Contro | |
> </li><li>Drag a desired animation clip into the <span class=' | |
> </li><li>Drag the model asset into the Hierarchy. | |
> </li><li>Add the animator controller to the <span class='doc- | |
> </li></ul><p class='vspace'><a name='ImportFile' id='ImportFi | |
</p> </p> | |
<div class='vspace'></div><h3>Importing Animations using mult <div class='vspace'></div><h3>Importing Animations using mult | |
<p>The other way to import animations is to follow the @ anim | <p>Another way to import animations is to follow the @ animat | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image | <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'><em>An example of four animation files for <p class='vspace'><em>An example of four animation files for | |
</p> </p> | |
<p class='vspace'>Unity automatically imports all four files <p class='vspace'>Unity automatically imports all four files | |
</p> </p> | |
<p class='vspace'>For <b>FBX</b> simply export a model file w <p class='vspace'>For <b>FBX</b> simply export a model file w | |
</p> </p> | |
<p class='vspace'><a name='ImportIK' id='ImportIK'></a> | <div class='vspace'></div> | |
> </p><small>Page last updated: 2012-08-17</p><br/> | |
> <hr><a name='Mecanim Animation System'></a><h1>Mecanim Animat | |
> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
> <p>The Mecanim Animation System currently works with humanoid | |
</p> </p> | |
<div class='vspace'></div><h3>Importing Inverse Kinematics</h | <div class='vspace'></div><ul><li class='toclink'><a href="Ma | |
<p>When importing animated characters from Maya that are crea | <ul><li class='toclink'><a href="Manual/CreatingtheAvatar.htm | |
> </li><li class='toclink'><a href="Manual/ConfiguringtheAvatar | |
> </li><li class='toclink'><a href="Manual/MuscleDefinitions.ht | |
> </li><li class='toclink'><a href="Manual/AvatarBodyMask.html" | |
> </li></ul></li><li class='toclink'><a href="Manual/InverseKin | |
> </li><li class='toclink'><a href="Manual/AnimationStateMachin | |
> <ul><li class='toclink'><a href="Manual/AnimationStates.html" | |
> </li><li class='toclink'><a href="Manual/AnimationTransitions | |
> </li><li class='toclink'><a href="Manual/AnimationEvents.html | |
> </li></ul></li><li class='toclink'><a href="Manual/AnimationS | |
> </li><li class='toclink'><a href="Manual/AnimationBlendTrees. | |
> </li><li class='toclink'><a href="Manual/AnimationLayers.html | |
> </li><li class='toclink'><a href="Manual/ScriptingRootMotion. | |
> </li></ul> | |
> </p><small>Page last updated: 2012-07-18</p><br/> | |
> <hr><a name='Avatar Creation and Setup'></a><h1>Avatar Creati | |
> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
> <ul><li class='toclink'><a href="Manual/CreatingtheAvatar.htm | |
> </li><li class='toclink'><a href="Manual/ConfiguringtheAvatar | |
> </li><li class='toclink'><a href="Manual/MuscleDefinitions.ht | |
> </li><li class='toclink'><a href="Manual/AvatarBodyMask.html" | |
> </li></ul> | |
> </p><small>Page last updated: 2012-07-19</p><br/> | |
> <hr><a name='Creating the Avatar'></a><h1>Creating the Avatar | |
> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
> <p>When an FBX file is added to the project, it is imported. | |
</p> </p> | |
<p class='vspace'><a name='IntoScene' id='IntoScene'></a> | <p class='vspace'>To create an avatar, you clicking the <span | |
</p> </p> | |
<div class='vspace'></div><h2>Bringing the character into the | <div class='vspace'></div><div><img class='figure' src='Image | |
<p>When you have imported your model you drag the object from | <p class='vspace'>When the Avatar has been created, you will | |
</p><div><img class='figure' src='Images/manual/Animations-2. | </p><div><img class='figure' src='Images/manual/CreatingtheAv | |
<p class='vspace'>The character above has three animations in | <p class='vspace'>After you hit <span class='doc-menu'>Apply< | |
</p> </p> | |
<div class='vspace'></div><div class='property-TIP'>TIP: You | <p class='vspace'>When the avatar has been "Applied", an Avat | |
</p><small>Page last updated: 2012-07-04</p> | </p> | |
<script type="text/javascript"> | <div class='vspace'></div><table width='100%'><tr ><td ><img | |
> <tr ><td >model without Avatar</td><td >model with Avatar</td | |
> </table> | |
> <p class='vspace'>(back to <a href="Manual/AvatarCreationandS | |
> </p> | |
> </p><small>Page last updated: 2012-08-16</p><br/> | |
> <hr><a name='Configuring the Avatar'></a><h1>Configuring the | |
> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
> <p>In the case the Avatar creation fails, you will see the fo | |
> </p><div><img class='figure' src='Images/manual/Configuringth | |
> <p>If there is no Avatar, the Mecanim system cannot be activa | |
> </p> | |
> <p class='vspace'>The success simply means all of the require | |
> Even in the case the Avatar creation succeeds, it is recommen | |
> </p><div><img class='figure' src='Images/manual/Configuringth | |
> <p class='vspace'>When you do that, the editor will ask you t | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>(The reason for this is that in <span class | |
> </p> | |
> <p class='vspace'>In order to get a valid avatar, you need to | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>When mapping your character requires you to | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>You can save that mapping in the *.ht forma | |
> </p> | |
> <p class='vspace'>If the model does NOT yield a valid match, | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>(back to <a href="Manual/AvatarCreationandS | |
> </p> | |
> </p><small>Page last updated: 2012-08-16</p><br/> | |
> <hr><a name='Muscle Definitions'></a><h1>Muscle Definitions</ | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
> <p>Once we have an Avatar, we have a proper bone structure, a | |
> Mecanim's concept of "muscles" allows you to have fine contro | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>You can either adjust individual bones in t | |
> </p> | |
> <p class='vspace'>In the <span class='doc-menu'>Muscles</span | |
> </p> | |
> <div class='vspace'></div><h1>Muscle Clips</h1> | |
> <p>In the Animation tab, you can set up animations for muscle | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>You can also control to what body parts the | |
> </p><div><img class='figure' src='Images/manual/MuscleDefinit | |
> <p class='vspace'>(back to <a href="Manual/AvatarCreationandS | |
> </p> | |
> </p><small>Page last updated: 2012-08-16</p><br/> | |
> <hr><a name='Avatar Body Mask'></a><h1>Avatar Body Mask</h1> | |
var allHTMLTags = new Array(); | <script src="Images/showhide.js" type="text/javascript">< | |
document.divs = new Array(); | | |
> <p>A body mask is a simple concept that allows us to allow / | |
> </p> | |
> <p class='vspace'>Body masks in the <span class='doc-inspecto | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <div class='indent'>Body mask in the animation clip inspector | |
> </div><p class='vspace'>You can also create Body Mask Assets | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <div class='indent'>Body mask in the Body Mask inspector (arm | |
> </div><p class='vspace'>The BodyMask assets can be reused in | |
> </p> | |
> </p><small>Page last updated: 2012-08-17</p><br/> | |
> <hr><a name='Inverse Kinematics'></a><h1>Inverse Kinematics</ | |
function getElementByClass(theClass) { | <script src="Images/showhide.js" type="text/javascript">< | |
> <h2>Inverse Kinematics </h2> | |
> <p>Inverse Kinematics (IK) is the ability to control the char | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>IK in Mecanim is possible for any characer | |
> </p> | |
> <p class='vspace'>To set up IK for a character, you typically | |
> <a class='urllink' href='ScriptReference/Animator.SetIKPositi | |
> <a class='urllink' href='ScriptReference/Animator.SetIKRotati | |
> <a class='urllink' href='ScriptReference/Animator.SetIKPositi | |
> <a class='urllink' href='ScriptReference/Animator.SetIKRotati | |
> <a class='urllink' href='ScriptReference/Animator.SetIKLookAt | |
> <a class='urllink' href='ScriptReference/Animator-bodyPositio | |
> <a class='urllink' href='ScriptReference/Animator-bodyRotatio | |
> </p> | |
> <p class='vspace'>In the illustration above, we show a charac | |
> </p> | |
> <p class='vspace'>We start out with a character that has a va | |
> </p> | |
> <div class='vspace'></div><pre class='codelisting'> | |
> using UnityEngine; | |
> using System; | |
> using System.Collections; | |
var allHTMLTags=document.getElementsByTagName("*" | [RequireComponent(typeof(Animator))] | |
for (var i=0; i<allHTMLTags.length; i++) { | public class IKCtrl : MonoBehaviour { | |
if (allHTMLTags[i].className==theClass) { | protected Animator animator; | |
return true; | | |
} | public bool ikActive = false; | |
} | public Transform rightHandObj = null; | |
return false; | | |
} | void Start () | |
> { | |
> animator = GetComponent<Animator>(); | |
> } | |
> | |
> //a callback for calculating IK | |
> void OnAvatarIK() | |
> { | |
> if(animator) { | |
> | |
> //if the IK is active, set the positi | |
> if(ikActive) { | |
> | |
> //weight = 1.0 for the right | |
> animator.SetIKPositionWeight( | |
> animator.SetIKRotationWeight( | |
> | |
> //set the position and the ro | |
> if(rightHandObj != null) { | |
> animator.SetIKPositio | |
> animator.SetIKRotatio | |
> } | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} } | |
} | | |
if(containerName == 'iosRef') { | //if the IK is not active, set the po | |
if(container.innerHTML == "<img src=\ | else { | |
container.innerHTML = "<img s | animator.SetIKPositionWeight( | |
SetCookie(containerName, 'set | animator.SetIKRotationWeight( | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} } | |
} } | |
if(containerName == 'androidRef') { | } | |
if(container.innerHTML == "<img src=\ | }</pre> | |
container.innerHTML = "<img s | <p class='vspace'>As we do not intend for the character to gr | |
SetCookie(containerName, 'set | </p> | |
} else { | <p class='vspace'>This sphere should then be placed as the "R | |
container.innerHTML = "<img s | </p><div><img class='figure' src='Images/manual/InverseKinema | |
UnSetCookie(containerName); | <p class='vspace'>Observe the character grabbing and ungrabbi | |
} | </p> | |
} | </p><small>Page last updated: 2012-08-06</p><br/> | |
} else { | <hr><a name='Animation State Machines'></a><h1>Animation Stat | |
if(container.innerHTML == "<h1><img src=\"../ | | |
container.innerHTML = "<h1><img src=\"../Imag | <script src="Images/showhide.js" type="text/javascript">< | |
SetCookie(containerName, 'set', 30); | | |
} else { | <p>Any GameObject containing an Avatar, will have an <span cl | |
container.innerHTML = "<h1><img src=\ | </p> | |
UnSetCookie(containerName); | <div class='vspace'></div><div><img class='figure' src='Image | |
} | <p class='vspace'>The <span class='doc-prop'>Animator</span> | |
> </p> | |
> <p class='vspace'>You can view the setup of this behavior via | |
> </p> | |
> <p class='vspace'>An <span class='doc-prop'>Animator Controll | |
> </p> | |
> <p class='vspace'>The <span class='doc-inspector'>Animator Co | |
> </p> | |
> <div class='vspace'></div><h1>Animation State Machines</h1> | |
> <p><span class='doc-keyword'>Animation State Machines</span> | |
> </p> | |
> <p class='vspace'>Animation State Machines can be set up from | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>State Machines consist of 3 types of things | |
> </p> | |
> <div class='vspace'></div><ul><li class='toclink'><a href="Ma | |
> </li><li class='toclink'><a href="Manual/AnimationTransitions | |
> </li><li class='toclink'><a href="Manual/AnimationEvents.html | |
> </li></ul> | |
> </p><small>Page last updated: 2012-08-17</p><br/> | |
> <hr><a name='Animation States'></a><h1>Animation States</h1> | |
> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> <h2>Animation States</h2> | |
> <p><span class='doc-keyword'>Animation States</span> are the | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <div class='vspace'></div><table width='100%'><tr class='tabl | |
> <tr ><td align='left'><span class='doc-prop'>Speed</span></t | |
> <tr ><td align='left'><span class='doc-prop'>Motion</span></ | |
> <tr ><td align='left'><span class='doc-prop'>Foot IK</span>< | |
> <tr ><td ><span class='doc-prop'>Transitions</span></td><td > | |
> </table> | |
> <p class='vspace'>The default state is the one that the state | |
> </p> | |
> <p class='vspace'>The most basic States can be created by rig | |
> </p> | |
> <div class='vspace'></div><h3>Any State</h3> | |
> <p><span class='doc-keyword'>Any State</span> is a special st | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>(back to <a href="Manual/AnimationStateMach | |
> </p> | |
> </p><small>Page last updated: 2012-08-15</p><br/> | |
> <hr><a name='Animation Transitions'></a><h1>Animation Transit | |
> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> <h2>Animation Transitions</h2> | |
> <p><span class='doc-keyword'>Animation Transitions</span> def | |
> </p> | |
> <div class='vspace'></div><table width='100%'><tr class='tabl | |
> <tr ><td align='left'><span class='doc-prop'>Atomic</span></ | |
> <tr ><td align='left'><span class='doc-prop'>Conditions</spa | |
> </table> | |
> <p class='vspace'>A condition consists of 2 parts: | |
> </p><ol><li>A conditional predicate (<span class='doc-prop'>I | |
> </li><li>An event parameter (in conjunction with <span class= | |
> </li><li>A parameter value (if needed) | |
> </li></ol><p class='vspace'>You can adjust the transition bet | |
> </p><div><img class='figure' src='Images/manual/AnimationTran | |
> <p class='vspace'>(back to <a href="Manual/AnimationStateMach | |
> </p> | |
> </p><small>Page last updated: 2012-08-16</p><br/> | |
> <hr><a name='Animation Events'></a><h1>Animation Events</h1> | |
> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> <h2>Animation Events</h2> | |
> <p>Animation Events expose the operation of the state machine | |
> </p> | |
> <div class='vspace'></div><ol><li>Setting up event parameters | |
> </li><li>Setting up conditions for transitions in the <span c | |
> </li><li>Controlling the event parameters from script. | |
> </li></ol><div class='vspace'></div><div><img class='figure' | |
> <p class='vspace'>Event parameters can be of 4 basic types: < | |
> </p> | |
> <p class='vspace'>Thus, a complete animated character in the | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>Here's an example of a script that modifies | |
> </p> | |
> <div class='vspace'></div><pre class='codelisting'> | |
> public class AvatarCtrl : MonoBehaviour { | |
> | |
> protected Animator animator; | |
> | |
> public float DirectionDampTime = .25f; | |
> | |
> void Start () | |
> { | |
> animator = GetComponent<Animator>(); | |
} } | |
for(var i = 0; i < document.divs.length; i++) { | | |
var divClassName = document.divs[i]; | void Update () | |
var matched = false; | { | |
if(divClassName.className == className) | if(animator) | |
matched = true; | { | |
if(matched) { | //get the current state | |
| AnimatorStateInfo stateInfo = animato | |
if(divClassName != null) { | | |
if (divClassName.style.displa | //if we're in "Run" mode, respond to | |
divClassName.style.di | if(stateInfo.name == "Base Layer.RunB | |
if(content == '') { | { | |
if(className | if(Input.GetButton("Fire1")) | |
conta | animator.SetBool("Jump", | |
if(className | } | |
conta | else | |
if(className | { | |
conta | animator.SetBool("Jump", fals | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} } | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
function GetCookie(cName) { | float h = Input.GetAxis("Horizontal") | |
if (document.cookie.length > 0) { | float v = Input.GetAxis("Vertical"); | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
function SetCookie(cName, value, expireDays) { | //set event parameters based on user | |
var exDate = new Date(); | animator.SetFloat("Speed", h*h+v*v); | |
exDate.setDate(exDate.getDate()+expireDays); | animator.SetFloat("Direction", h, Dir | |
document.cookie = cName + "=" + escape(value) + ((exp | } | |
} | } | |
> } | |
> </pre> | |
> <p class='vspace'>(back to <a href="Manual/AnimationStateMach | |
> </p> | |
> </p><small>Page last updated: 2012-08-15</p><br/> | |
> <hr><a name='Animation State Machine Preview (solo and mute)' | |
function DocLoaded() { | <script src="Images/showhide.js" type="text/javascript">< | |
document.divs = document.getElementsByTagName('div'); | <h2>Solo and Mute functionality</h2> | |
var prefDesktop = GetCookie('desktopRef'); | <p>In complex state machines, it is useful to preview the ope | |
var prefiOS = GetCookie('iosRef'); | </p> | |
var prefAndroid = GetCookie('androidRef'); | <div class='vspace'></div><div><img class='figure' src='Image | |
var firstTime = GetCookie('FT'); | <p class='vspace'>Soloed transitions will be shown in green, | |
if (firstTime == null || firstTime == "" ) { | </p> | |
SetCookie('FT', 'no', 30); | <div class='vspace'></div><div><img class='figure' src='Image | |
SetCookie('desktopRef', 'set', 30) | <p class='vspace'>In the example above, if you are in <code>S | |
} else if (prefDesktop == null || prefDesktop =="") { | </p> | |
if(getElementByClass('desktopRefIMG')) { | </p><small>Page last updated: 2012-08-03</p><br/> | |
ShowHideDiv('desktopRef','specific-desktop',' | <hr><a name='Animation Blend Trees'></a><h1>Animation Blend T | |
} else { | | |
ShowHideDiv('desktopRef','specific-desktop',' | <script src="Images/showhide.js" type="text/javascript">< | |
} | | |
} | <p>Blend Trees are used for continuous blending between simil | |
if (prefiOS == null || prefiOS =="") { | </p> | |
if(getElementByClass('iosRefIMG')) { | <p class='vspace'>To start working with a new blend tree, you | |
ShowHideDiv('iosRef','specific-ios',''); | </p><ol><li>Right-click on empty space on the <span class='do | |
} else { | </li><li>Select <span class='doc-menu'>From New Blend Tree</s | |
ShowHideDiv('iosRef','specific-ios','iOS'); | </li><li>Double-click on the Blend Tree to bring up the <span | |
} | </li></ol><div class='vspace'></div><div><img class='figure' | |
> <p class='vspace'>In the inspector, the first thing you need | |
> </p> | |
> <p class='vspace'>Then you can add individual animations by c | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>The red vertical bar indicates the current | |
> </p> | |
> <div class='vspace'></div><div class='property-FAQ'>FAQ: When | |
> <div class='property-Answer'>Answer: State machines are used | |
> </p><small>Page last updated: 2012-08-16</p><br/> | |
> <hr><a name='Animation Layers'></a><h1>Animation Layers</h1> | |
> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
> <p>Unity uses <span class='doc-keyword'>Animation Layers</spa | |
> </p> | |
> <p class='vspace'>You can manage animation layers from the <s | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>You can add a new layer by pressing the <sp | |
> </p> | |
> <p class='vspace'>The <span class='doc-prop'>Mask</span> prop | |
> </p> | |
> <div class='vspace'></div><div><img class='figure' src='Image | |
> <p class='vspace'>For more on Avatar Body Masks, you can read | |
> </p> | |
> </p><small>Page last updated: 2012-08-17</p><br/> | |
> <hr><a name='Scripting Root Motion'></a><h1>Scripting Root Mo | |
> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
> <p>Sometimes your animation comes as "in-place", which means | |
> </p> | |
> <div class='vspace'></div><ul><li>Open the inspector for the | |
> </li><li>Make sure the <span class='doc-menu'>Muscle Definiti | |
> </li><li>Select the animation clip from the available clips | |
> </li><li>Make sure <span class='doc-prop'>Loop Pose</span> is | |
> </li></ul><div class='vspace'></div><div><img class='figure' | |
> <div class='vspace'></div><ul><li>Preview the animation in th | |
> </li><li>Name that curve something meaningful, like "Runspeed | |
> </li></ul><div class='vspace'></div><div><img class='figure' | |
> <div class='vspace'></div><ul><li>Create a new <span class='d | |
> </li><li>Drop the desired animation clip into it, this should | |
> </li><li>Add a parameter to the Controller with the same name | |
> </li></ul><div class='vspace'></div><div><img class='figure' | |
> <div class='vspace'></div><ul><li>Select the character <span | |
> </li><li>Drag <span class='doc-prop'>RootMotionController</sp | |
> </li><li>If you press play now, you should see the "Dude" run | |
> <div class='vspace'></div></li><li>Finally, to control the mo | |
> </li></ul><pre class='codelisting'> | |
> using UnityEngine; | |
> using System.Collections; | |
> | |
> [RequireComponent(typeof(Animator))] | |
> | |
> public class RootMotionScript : MonoBehaviour { | |
> | |
> void OnAvatarMove() | |
> { | |
> Animator animator = GetComponent<Animator>( | |
> | |
> if (animator) | |
> { | |
> Vector3 newPosition = transform.position; | |
> newPosition.z += animator.GetFloat("Runspeed") | |
> transform.position = newPosition; | |
> } | |
} } | |
if (prefAndroid == null || prefAndroid =="") { | } | |
if(getElementByClass('androidRefIMG')) { | </pre> | |
ShowHideDiv('androidRef','specific-android',' | <ul><li>Attach RootMotionScript.cs to "Dude" | |
} else { | </li><li>Note that the Animator component detects there is a | |
ShowHideDiv('androidRef','specific-android',' | </li></ul><div><img class='figure' src='Images/manual/Scripti | |
} | <ul><li>Now you should see that the character is moving at th | |
} | </li></ul> | |
} | </p><small>Page last updated: 2012-08-16</p><br/> | |
</script> < | |
<br/> < | |
<hr><a name='Materials'></a><h1>Materials</h1> <hr><a name='Materials'></a><h1>Materials</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>There is a close relationship between <span class='doc-key <p>There is a close relationship between <span class='doc-key | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>To create a new Material, use <span class=' <p class='vspace'>To create a new Material, use <span class=' | |
</p> </p> | |
<div class='vspace'></div><h2>Setting Material Properties</h2 <div class='vspace'></div><h2>Setting Material Properties</h2 | |
<p>You can select which Shader you want any particular Materi <p>You can select which Shader you want any particular Materi | |
</p> </p> | |
<p class='vspace'>There are two ways to apply a <span class=' <p class='vspace'>There are two ways to apply a <span class=' | |
</p> </p> | |
<div class='vspace'></div><ol><li>Drag it from the Project Vi <div class='vspace'></div><ol><li>Drag it from the Project Vi | |
</li><li>Click the <span class='doc-menu'>Select</span> butto </li><li>Click the <span class='doc-menu'>Select</span> butto | |
</li></ol><p class='vspace'>Two placement options are availab </li></ol><p class='vspace'>Two placement options are availab | |
</p> </p> | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><span class='doc-prop'>Tiling</span></ <tr ><td align='left'><span class='doc-prop'>Tiling</span></ | |
<tr ><td align='left'><span class='doc-prop'>Offset</span></ <tr ><td align='left'><span class='doc-prop'>Offset</span></ | |
</table> </table> | |
<div class='vspace'></div><h2>Built-in Shaders</h2> <div class='vspace'></div><h2>Built-in Shaders</h2> | |
<p>There is a library of <a href="Components/Built-inShaderGu <p>There is a library of <a href="Components/Built-inShaderGu | |
</p> </p> | |
<div class='vspace'></div><ul><li><a href="Components/shader- <div class='vspace'></div><ul><li><a href="Components/shader- | |
</li><li><a href="Components/shader-TransparentFamily.html">T </li><li><a href="Components/shader-TransparentFamily.html">T | |
</li><li><a href="Components/shader-TransparentCutoutFamily.h </li><li><a href="Components/shader-TransparentCutoutFamily.h | |
</li><li><a href="Components/shader-SelfIllumFamily.html">Sel </li><li><a href="Components/shader-SelfIllumFamily.html">Sel | |
</li><li><a href="Components/shader-ReflectiveFamily.html">Re </li><li><a href="Components/shader-ReflectiveFamily.html">Re | |
</li></ul><p class='vspace'>In each group, built-in shaders r </li></ul><p class='vspace'>In each group, built-in shaders r | |
</p> </p> | |
<p class='vspace'>This grid displays a thumbnail of all built <p class='vspace'>This grid displays a thumbnail of all built | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Shader technical details</h2> <div class='vspace'></div><h2>Shader technical details</h2> | |
<p>Unity has an extensive Shader system, allowing you to twea <p>Unity has an extensive Shader system, allowing you to twea | |
</p> </p> | |
<p class='vspace'>A Shader basically defines a formula for ho <p class='vspace'>A Shader basically defines a formula for ho | |
</p> </p> | |
<p class='vspace'>This is rather complex, so let's look at a <p class='vspace'>This is rather complex, so let's look at a | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>On the left side of the graph is the <span <p class='vspace'>On the left side of the graph is the <span | |
</p> </p> | |
<p class='vspace'>To be more specific, a Shader defines: <p class='vspace'>To be more specific, a Shader defines: | |
</p><ul><li>The method to render an object. This includes usi </p><ul><li>The method to render an object. This includes usi | |
</li><li>Any vertex and fragment programs used to render. </li><li>Any vertex and fragment programs used to render. | |
</li><li>Some texture properties that are assignable within M </li><li>Some texture properties that are assignable within M | |
</li><li>Color and number settings that are assignable within </li><li>Color and number settings that are assignable within | |
</li></ul><p class='vspace'>A Material defines: </li></ul><p class='vspace'>A Material defines: | |
</p><ul><li>Which textures to use for rendering. </p><ul><li>Which textures to use for rendering. | |
</li><li>Which colors to use for rendering. </li><li>Which colors to use for rendering. | |
</li><li>Any other assets, such as a Cubemap that is required </li><li>Any other assets, such as a Cubemap that is required | |
</li></ul><p class='vspace'>Shaders are meant to be written b </li></ul><p class='vspace'>Shaders are meant to be written b | |
</p> </p> | |
<p class='vspace'>A number of shaders are built into Unity di <p class='vspace'>A number of shaders are built into Unity di | |
</p> </p> | |
</p><small>Page last updated: 2010-09-16</p> | </p><small>Page last updated: 2010-09-16</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Textures'></a><h1>Textures</h1> <hr><a name='Textures'></a><h1>Textures</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p><span class='doc-keyword'>Textures</span> bring your <span <p><span class='doc-keyword'>Textures</span> bring your <span | |
</p> </p> | |
<p class='vspace'>The shaders you use for your objects put sp <p class='vspace'>The shaders you use for your objects put sp | |
</p> </p> | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<p>The <span class='doc-keyword'>Texture Inspector</span> loo <p>The <span class='doc-keyword'>Texture Inspector</span> loo | |
</p> </p> | |
<p class='vspace'>The top section contains a few settings, an <p class='vspace'>The top section contains a few settings, an | |
</p> </p> | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><span class='doc-prop'>Aniso Level</sp <tr ><td align='left'><span class='doc-prop'>Aniso Level</sp | |
<tr ><td align='left'><span class='doc-prop'>Filter Mode</sp <tr ><td align='left'><span class='doc-prop'>Filter Mode</sp | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Wrap Mode</span <tr ><td align='left'><span class='doc-prop'>Wrap Mode</span | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table> </table> | |
<div class='vspace'></div><h2>Texture Importer</h2> <div class='vspace'></div><h2>Texture Importer</h2> | |
<p>Textures all come from image files in your <span class='do <p>Textures all come from image files in your <span class='do | |
</p> </p> | |
<p class='vspace'>In Unity 3 we simplified for you all the se <p class='vspace'>In Unity 3 we simplified for you all the se | |
</p> </p> | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><span class='doc-prop'>Texture Type</s <tr ><td align='left'><span class='doc-prop'>Texture Type</s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table> </table> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><table width='100%'><tr ><td ><span <div class='vspace'></div><table width='100%'><tr ><td ><span | |
</table> </table> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><table width='100%'><tr ><td align <div class='vspace'></div><table width='100%'><tr ><td align | |
<tr ><td align='left'><span class='doc-prop'>Bumpiness</span <tr ><td align='left'><span class='doc-prop'>Bumpiness</span | |
<tr ><td align='left'><span class='doc-prop'>Filtering</span <tr ><td align='left'><span class='doc-prop'>Filtering</span | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table> </table> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>You dont need to set any values in this cas <p class='vspace'>You dont need to set any values in this cas | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><table width='100%'><tr ><td align <div class='vspace'></div><table width='100%'><tr ><td align | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table> </table> | |
<p class='vspace'>An interesting way to add a lot of visual d <p class='vspace'>An interesting way to add a lot of visual d | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><table width='100%'><tr ><td align <div class='vspace'></div><table width='100%'><tr ><td align | |
<tr ><td align='left'><span class='doc-prop'>Generate Alpha <tr ><td align='left'><span class='doc-prop'>Generate Alpha | |
</table> </table> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><table width='100%'><tr ><td align <div class='vspace'></div><table width='100%'><tr ><td align | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Generate Cube M <tr ><td align='left'><span class='doc-prop'>Generate Cube M | |
<tr ><td align='left'><span class='doc-prop'>Read/Write Enab <tr ><td align='left'><span class='doc-prop'>Read/Write Enab | |
<tr ><td align='left'><span class='doc-prop'>Generate Mip Ma <tr ><td align='left'><span class='doc-prop'>Generate Mip Ma | |
<tr ><td align='left'><span class='doc-prop'>Correct Gamma</ <tr ><td align='left'><span class='doc-prop'>Correct Gamma</ | |
<tr ><td align='left'><span class='doc-prop'>Border Mip Maps <tr ><td align='left'><span class='doc-prop'>Border Mip Maps | |
<tr ><td align='left'><span class='doc-prop'>Mip Map Filteri <tr ><td align='left'><span class='doc-prop'>Mip Map Filteri | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Fade Out Mips</ <tr ><td align='left'><span class='doc-prop'>Fade Out Mips</ | |
<tr ><td align='left'><span class='doc-prop'>Generate Norma <tr ><td align='left'><span class='doc-prop'>Generate Norma | |
<tr ><td align='left'><span class='doc-prop'>Bumpiness</span <tr ><td align='left'><span class='doc-prop'>Bumpiness</span | |
<tr ><td align='left'><span class='doc-prop'>Filtering</span <tr ><td align='left'><span class='doc-prop'>Filtering</span | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Normal Map</spa <tr ><td align='left'><span class='doc-prop'>Normal Map</spa | |
<tr ><td align='left'><span class='doc-prop'>Lightmap</span> <tr ><td align='left'><span class='doc-prop'>Lightmap</span> | |
</table> </table> | |
<div class='vspace'></div><h2>Per-Platform Overrides</h2> <div class='vspace'></div><h2>Per-Platform Overrides</h2> | |
<p>When you are building for different platforms, you have to <p>When you are building for different platforms, you have to | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<table width='100%'><tr ><td align='left'><span class='doc-p <table width='100%'><tr ><td align='left'><span class='doc-p | |
<tr ><td align='left'><span class='doc-prop'>Texture Format< <tr ><td align='left'><span class='doc-prop'>Texture Format< | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table> </table> | |
<p class='vspace'>If you have set the <span class='doc-menu'> <p class='vspace'>If you have set the <span class='doc-menu'> | |
</p> </p> | |
<div class='vspace'></div><a class='desktopRef' id='desktopRe <div class='vspace'></div><a class='desktopRef' id='desktopRe | |
<div class='specific-desktop' style='display: block;' id='spe <div class='specific-desktop' style='display: block;' id='spe | |
<table width='100%'><tr ><td align='left'><span class='doc-p <table width='100%'><tr ><td align='left'><span class='doc-p | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table></div> </table></div> | |
<a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i <a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i | |
<div class='specific-ios' style='display: block;' id='specifi <div class='specific-ios' style='display: block;' id='specifi | |
<table width='100%'><tr ><td align='left'><span class='doc-p <table width='100%'><tr ><td align='left'><span class='doc-p | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table></div> </table></div> | |
<a class='androidRef' id='androidRef' href="javascript:ShowHi <a class='androidRef' id='androidRef' href="javascript:ShowHi | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<table width='100%'><tr ><td align='left'><span class='doc-p <table width='100%'><tr ><td align='left'><span class='doc-p | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table> </table> | |
<p class='vspace'>Unless you're targeting a specific hardware <p class='vspace'>Unless you're targeting a specific hardware | |
If you absolutely want to store an alpha channel in a texture If you absolutely want to store an alpha channel in a texture | |
</p> </p> | |
<p class='vspace'>Textures can be imported from DDS files but <p class='vspace'>Textures can be imported from DDS files but | |
</p> </p> | |
<p class='vspace'>If your app utilizes an unsupported texture <p class='vspace'>If your app utilizes an unsupported texture | |
So in this case you lose time decompressing textures and lose So in this case you lose time decompressing textures and lose | |
</p></div> </p></div> | |
<p class='vspace'><a name='details' id='details'></a> <p class='vspace'><a name='details' id='details'></a> | |
</p><h2>Details</h2> </p><h2>Details</h2> | |
<div class='vspace'></div><h3>Supported Formats</h3> <div class='vspace'></div><h3>Supported Formats</h3> | |
<p>Unity can read the following file formats: PSD, TIFF, JPG, <p>Unity can read the following file formats: PSD, TIFF, JPG, | |
</p> </p> | |
<p class='vspace'><a name='texturesizes' id='texturesizes'></ <p class='vspace'><a name='texturesizes' id='texturesizes'></ | |
</p><h3>Texture Sizes</h3> </p><h3>Texture Sizes</h3> | |
<p>Ideally texture sizes should be powers of two on the sides <p>Ideally texture sizes should be powers of two on the sides | |
</p> </p> | |
<p class='vspace'>It is possible to use other (non power of t <p class='vspace'>It is possible to use other (non power of t | |
</p> </p> | |
<p class='vspace'>Non power of two texture assets can be scal <p class='vspace'>Non power of two texture assets can be scal | |
</p> </p> | |
<div class='vspace'></div><h3>UV Mapping</h3> <div class='vspace'></div><h3>UV Mapping</h3> | |
<p>When mapping a 2D texture onto a 3D model, some sort of wr <p>When mapping a 2D texture onto a 3D model, some sort of wr | |
</p> </p> | |
<p class='vspace'><a name='mipmaps' id='mipmaps'></a> <p class='vspace'><a name='mipmaps' id='mipmaps'></a> | |
</p><h3>Mip Maps</h3> </p><h3>Mip Maps</h3> | |
<p>Mip Maps are a list of progressively smaller versions of a <p>Mip Maps are a list of progressively smaller versions of a | |
</p> </p> | |
<p class='vspace'><a name='normalmaps' id='normalmaps'></a> <p class='vspace'><a name='normalmaps' id='normalmaps'></a> | |
</p><h3>Normal Maps</h3> </p><h3>Normal Maps</h3> | |
<p>Normal maps are used by normal map shaders to make low-pol <p>Normal maps are used by normal map shaders to make low-pol | |
</p> </p> | |
<div class='vspace'></div><h3>Detail Maps</h3> <div class='vspace'></div><h3>Detail Maps</h3> | |
<p>If you want to make a terrain, you normally use your main <p>If you want to make a terrain, you normally use your main | |
</p> </p> | |
<p class='vspace'>When drawing detail textures, a neutral gra <p class='vspace'>When drawing detail textures, a neutral gra | |
</p> </p> | |
<div class='vspace'></div><h3>Reflections (Cube Maps)</h3> <div class='vspace'></div><h3>Reflections (Cube Maps)</h3> | |
<p>If you want to use texture for reflection maps (e.g. use t <p>If you want to use texture for reflection maps (e.g. use t | |
</p> </p> | |
<p class='vspace'><a name='anisotropy' id='anisotropy'></a> <p class='vspace'><a name='anisotropy' id='anisotropy'></a> | |
</p><h3>Anisotropic filtering</h3> </p><h3>Anisotropic filtering</h3> | |
<p>Anisotropic filtering increases texture quality when viewe <p>Anisotropic filtering increases texture quality when viewe | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div> <div class='vspace'></div> | |
</p><small>Page last updated: 2007-11-16</p> | </p><small>Page last updated: 2007-11-16</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Procedural Materials'></a><h1>Procedural Materia <hr><a name='Procedural Materials'></a><h1>Procedural Materia | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity incorporates a new asset type known as <span class=' <p>Unity incorporates a new asset type known as <span class=' | |
</p> </p> | |
<p class='vspace'>The script code that generates a texture pr <p class='vspace'>The script code that generates a texture pr | |
</p> </p> | |
<p class='vspace'>Unity's Procedural Material system is based <p class='vspace'>Unity's Procedural Material system is based | |
</p> </p> | |
<div class='vspace'></div><h2>Supported Platforms</h2> <div class='vspace'></div><h2>Supported Platforms</h2> | |
<p>In Unity, Procedural Materials are fully supported for sta <p>In Unity, Procedural Materials are fully supported for sta | |
</p> </p> | |
<div class='vspace'></div><h2>Adding Procedural Materials to <div class='vspace'></div><h2>Adding Procedural Materials to | |
<p>A Procedural Material is supplied as a Substance Archive f <p>A Procedural Material is supplied as a Substance Archive f | |
</p> </p> | |
<p class='vspace'>Although they are implemented differently, <p class='vspace'>Although they are implemented differently, | |
</p> </p> | |
<div class='vspace'></div><h2>Procedural Properties</h2> <div class='vspace'></div><h2>Procedural Properties</h2> | |
<p>Each Procedural Material is a custom script which generate <p>Each Procedural Material is a custom script which generate | |
</p> </p> | |
<p class='vspace'>Procedural Materials can also incorporate c <p class='vspace'>Procedural Materials can also incorporate c | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Creating Procedural Materials F <div class='vspace'></div><h2>Creating Procedural Materials F | |
<p>Procedural Materials can work with any combination of proc <p>Procedural Materials can work with any combination of proc | |
</p> </p> | |
<p class='vspace'>The design tools available for creating Pro <p class='vspace'>The design tools available for creating Pro | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Obtaining Procedural Materials< <div class='vspace'></div><h2>Obtaining Procedural Materials< | |
<p>Since Unity's Procedural Materials are based on the indust <p>Since Unity's Procedural Materials are based on the indust | |
</p> </p> | |
<div class='vspace'></div><h2>Performance and Optimization</h <div class='vspace'></div><h2>Performance and Optimization</h | |
<p>Procedural Materials inherently tend to use less storage t <p>Procedural Materials inherently tend to use less storage t | |
</p> </p> | |
<p class='vspace'>Procedural Materials support a form of cach <p class='vspace'>Procedural Materials support a form of cach | |
</p> </p> | |
<div class='vspace'></div><div class='indent'>Procedural Mate <div class='vspace'></div><div class='indent'>Procedural Mate | |
</div><p class='vspace'>Procedural Materials can also be used </div><p class='vspace'>Procedural Materials can also be used | |
</p> </p> | |
<div class='vspace'></div><h2>Using the Substance Player to A <div class='vspace'></div><h2>Using the Substance Player to A | |
<p>Since the complexity of a Procedural Material can affect r <p>Since the complexity of a Procedural Material can affect r | |
</p> </p> | |
<p class='vspace'>Substance Player uses the same optimized re <p class='vspace'>Substance Player uses the same optimized re | |
</p> </p> | |
</p><small>Page last updated: 2011-11-23</p> | </p><small>Page last updated: 2011-11-23</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Video Files'></a><h1>Video Files</h1> <hr><a name='Video Files'></a><h1>Video Files</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p><b>Note:</b> This is a <b>Pro/Advanced</b> feature only. <p><b>Note:</b> This is a <b>Pro/Advanced</b> feature only. | |
</p><a class='desktopRef' id='desktopRef' href="javascript:Sh </p><a class='desktopRef' id='desktopRef' href="javascript:Sh | |
<div class='specific-desktop' style='display: block;' id='spe <div class='specific-desktop' style='display: block;' id='spe | |
<p><span class='doc-keyword'>Movie Textures</span> are animat <p><span class='doc-keyword'>Movie Textures</span> are animat | |
</p> </p> | |
<p class='vspace'>Video files are imported via Apple QuickTim <p class='vspace'>Video files are imported via Apple QuickTim | |
</p> </p> | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<p>The Movie Texture <span class='doc-keyword'>Inspector</spa <p>The Movie Texture <span class='doc-keyword'>Inspector</spa | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><span class='doc-prop'>Aniso Level</sp <tr ><td align='left'><span class='doc-prop'>Aniso Level</sp | |
<tr ><td align='left'><span class='doc-prop'>Filtering Mode< <tr ><td align='left'><span class='doc-prop'>Filtering Mode< | |
<tr ><td align='left'><span class='doc-prop'>Loop</span></td <tr ><td align='left'><span class='doc-prop'>Loop</span></td | |
<tr ><td align='left'><span class='doc-prop'>Quality</span>< <tr ><td align='left'><span class='doc-prop'>Quality</span>< | |
</table> </table> | |
<div class='vspace'></div><h2>Details</h2> <div class='vspace'></div><h2>Details</h2> | |
<p>When a video file is added to your Project, it will automa <p>When a video file is added to your Project, it will automa | |
</p> </p> | |
<div class='vspace'></div><h3>Playing the Movie</h3> <div class='vspace'></div><h3>Playing the Movie</h3> | |
<p>Your Movie Texture will not play automatically when the ga <p>Your Movie Texture will not play automatically when the ga | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'> <div class='vspace'></div><pre class='codelisting'> | |
// this line of code will make the Movie Texture begin playin // this line of code will make the Movie Texture begin playin | |
renderer.material.mainTexture.Play(); renderer.material.mainTexture.Play(); | |
</pre> </pre> | |
<p class='vspace'>Attach the following script to toggle Movie <p class='vspace'>Attach the following script to toggle Movie | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'> <div class='vspace'></div><pre class='codelisting'> | |
function Update () { function Update () { | |
if (Input.GetButtonDown ("Jump")) { if (Input.GetButtonDown ("Jump")) { | |
if (renderer.material.mainTexture.isPlaying) if (renderer.material.mainTexture.isPlaying) | |
renderer.material.mainTexture.Pause() renderer.material.mainTexture.Pause() | |
} } | |
else { else { | |
renderer.material.mainTexture.Play(); renderer.material.mainTexture.Play(); | |
} } | |
} } | |
} } | |
</pre> </pre> | |
<p class='vspace'>For more information about playing Movie Te <p class='vspace'>For more information about playing Movie Te | |
</p> </p> | |
<div class='vspace'></div><h3>Movie Audio</h3> <div class='vspace'></div><h3>Movie Audio</h3> | |
<p>When a Movie Texture is imported, the audio track accompan <p>When a Movie Texture is imported, the audio track accompan | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>To play this audio, the Audio Clip must be <p class='vspace'>To play this audio, the Audio Clip must be | |
</p></div> </p></div> | |
<a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i <a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i | |
<div class='specific-ios' style='display: block;' id='specifi <div class='specific-ios' style='display: block;' id='specifi | |
<p>Movie Textures are not supported on iOS. Instead, full-scr <p>Movie Textures are not supported on iOS. Instead, full-scr | |
</p> </p> | |
<p class='vspace'>You can import your video file just like a <p class='vspace'>You can import your video file just like a | |
</p><h3>You need to keep your videos inside the <em>Streaming </p><h3>You need to keep your videos inside the <em>Streaming | |
<p class='vspace'>Unity iOS supports any movie file types tha <p class='vspace'>Unity iOS supports any movie file types tha | |
</p><ul><li>H.264 Baseline Profile Level 3.0 video </p><ul><li>H.264 Baseline Profile Level 3.0 video | |
</li><li>MPEG-4 Part 2 video </li><li>MPEG-4 Part 2 video | |
</li></ul><p class='vspace'>For more information about suppor </li></ul><p class='vspace'>For more information about suppor | |
</p> </p> | |
<p class='vspace'>As soon as you call <a class='urllink' href <p class='vspace'>As soon as you call <a class='urllink' href | |
</p> </p> | |
<div class='vspace'></div><h3>The video player does not respe <div class='vspace'></div><h3>The video player does not respe | |
<p>As written above, video files are played using Apple's emb <p>As written above, video files are played using Apple's emb | |
</p> </p> | |
<div class='vspace'></div><h3>The video player does not respe <div class='vspace'></div><h3>The video player does not respe | |
<p>The Apple video player and iPhone SDK do not provide a way <p>The Apple video player and iPhone SDK do not provide a way | |
</p></div> </p></div> | |
<div class='vspace'></div><a class='androidRef' id='androidRe <div class='vspace'></div><a class='androidRef' id='androidRe | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<p>Movie Textures are not supported on Android. Instead, full <p>Movie Textures are not supported on Android. Instead, full | |
</p> </p> | |
<p class='vspace'>You can import your video file just like a <p class='vspace'>You can import your video file just like a | |
</p><h3>You need to keep your videos inside of the <em>Stream </p><h3>You need to keep your videos inside of the <em>Stream | |
<p class='vspace'>Unity Android supports any movie file type <p class='vspace'>Unity Android supports any movie file type | |
</p><ul><li>H.263 </p><ul><li>H.263 | |
</li><li>H.264 AVC </li><li>H.264 AVC | |
</li><li>MPEG-4 SP </li><li>MPEG-4 SP | |
</li></ul><p class='vspace'>However, device vendors are keen </li></ul><p class='vspace'>However, device vendors are keen | |
</p> </p> | |
<p class='vspace'>For more information about the supported co <p class='vspace'>For more information about the supported co | |
</p> </p> | |
<p class='vspace'>As soon as you call <a class='urllink' href <p class='vspace'>As soon as you call <a class='urllink' href | |
</p></div> </p></div> | |
</p><small>Page last updated: 2007-11-16</p> | </p><small>Page last updated: 2007-11-16</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Audio Files'></a><h1>Audio Files</h1> <hr><a name='Audio Files'></a><h1>Audio Files</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>As with Meshes or Textures, the workflow for <span class=' <p>As with Meshes or Textures, the workflow for <span class=' | |
</p> </p> | |
<p class='vspace'>Audio in Unity is either <em>Native</em> or <p class='vspace'>Audio in Unity is either <em>Native</em> or | |
</p> </p> | |
<div class='vspace'></div><ul><li><span class='doc-keyword'>N <div class='vspace'></div><ul><li><span class='doc-keyword'>N | |
<div class='vspace'></div></li><li><span class='doc-keyword'> <div class='vspace'></div></li><li><span class='doc-keyword'> | |
</li></ul><p class='vspace'>Any Audio File imported into Unit </li></ul><p class='vspace'>Any Audio File imported into Unit | |
</p> </p> | |
<div class='vspace'></div><h2>Supported Formats</h2> <div class='vspace'></div><h2>Supported Formats</h2> | |
<table border='1' ><tr ><th >Format</th><th >Compressed as (M <table border='1' ><tr ><th >Format</th><th >Compressed as (M | |
<tr ><td align='left'>MPEG(1/2/3)</td><td align='center'>Og <tr ><td align='left'>MPEG(1/2/3)</td><td align='center'>Og | |
<tr ><td align='left'>Ogg Vorbis</td><td align='center'>Ogg <tr ><td align='left'>Ogg Vorbis</td><td align='center'>Ogg | |
<tr ><td align='left'>WAV</td><td align='center'>Ogg Vorbis <tr ><td align='left'>WAV</td><td align='center'>Ogg Vorbis | |
<tr ><td align='left'>AIFF</td><td align='center'>Ogg Vorbi <tr ><td align='left'>AIFF</td><td align='center'>Ogg Vorbi | |
<tr ><td align='left'>MOD</td><td align='center'>-</td><td <tr ><td align='left'>MOD</td><td align='center'>-</td><td | |
<tr ><td align='left'>IT</td><td align='center'>-</td><td <tr ><td align='left'>IT</td><td align='center'>-</td><td | |
<tr ><td align='left'>S3M</td><td align='center'>-</td><td <tr ><td align='left'>S3M</td><td align='center'>-</td><td | |
<tr ><td align='left'>XM</td><td align='center'>-</td><td <tr ><td align='left'>XM</td><td align='center'>-</td><td | |
</table> </table> | |
<div class='vspace'></div> <div class='vspace'></div> | |
<p class='vspace'>See the <a href="Manual/Sound.html">Sound c <p class='vspace'>See the <a href="Manual/Sound.html">Sound c | |
</p> </p> | |
<div class='vspace'></div><h1>Audio Clip</h1> <div class='vspace'></div><h1>Audio Clip</h1> | |
<p><span class='doc-keyword'>Audio Clips</span> contain the a <p><span class='doc-keyword'>Audio Clips</span> contain the a | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table border='1' ><tr class='tableheader'><td class='prop'> <table border='1' ><tr class='tableheader'><td class='prop'> | |
<tr ><td align='left'><span class='doc-prop'>Audio Format</s <tr ><td align='left'><span class='doc-prop'>Audio Format</s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>3D Sound</span> <tr ><td align='left'><span class='doc-prop'>3D Sound</span> | |
<tr ><td align='left'><span class='doc-prop'>Force to mono</ <tr ><td align='left'><span class='doc-prop'>Force to mono</ | |
<tr ><td align='left'><span class='doc-prop'>Load Type</span <tr ><td align='left'><span class='doc-prop'>Load Type</span | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Compression</sp <tr ><td align='left'><span class='doc-prop'>Compression</sp | |
</table><div class='specific-ios' style='display: block;' id= </table><div class='specific-ios' style='display: block;' id= | |
<table border='1' ><tr ><td align='left'><span class='doc-pr <table border='1' ><tr ><td align='left'><span class='doc-pr | |
</table></div> </table></div> | |
<table border='1' ><tr ><td align='left'><span class='doc-pr <table border='1' ><tr ><td align='left'><span class='doc-pr | |
</table> </table> | |
<div class='vspace'></div><h2>Importing Audio Assets</h2> <div class='vspace'></div><h2>Importing Audio Assets</h2> | |
<p>Unity supports both <em>Compressed</em> and <em>Native</em <p>Unity supports both <em>Compressed</em> and <em>Native</em | |
</p> </p> | |
<p class='vspace'>As a general rule of thumb, <em>Compressed< <p class='vspace'>As a general rule of thumb, <em>Compressed< | |
</p> </p> | |
<p class='vspace'><a name='PositionalAudio' id='PositionalAud <p class='vspace'><a name='PositionalAudio' id='PositionalAud | |
</p><h2>Using 3D Audio</h2> </p><h2>Using 3D Audio</h2> | |
<p>If an audio clip is marked as a <span class='doc-prop'>3D <p>If an audio clip is marked as a <span class='doc-prop'>3D | |
</p> </p> | |
<div class='vspace'></div><h2>Platform specific details</h2> <div class='vspace'></div><h2>Platform specific details</h2> | |
<a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i <a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i | |
<div class='specific-ios' style='display: block;' id='specifi <div class='specific-ios' style='display: block;' id='specifi | |
<p>On mobile platforms compressed audio is encoded as MP3 to <p>On mobile platforms compressed audio is encoded as MP3 to | |
</p> </p> | |
<p class='vspace'>To improve performance, audio clips can be <p class='vspace'>To improve performance, audio clips can be | |
Note that only one hardware audio stream can be decompressed Note that only one hardware audio stream can be decompressed | |
</p> </p> | |
<p class='vspace'>If the hardware decoder is not available, t <p class='vspace'>If the hardware decoder is not available, t | |
</p></div> </p></div> | |
<a class='androidRef' id='androidRef' href="javascript:ShowHi <a class='androidRef' id='androidRef' href="javascript:ShowHi | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<p>On mobile platforms compressed audio is encoded as MP3 to <p>On mobile platforms compressed audio is encoded as MP3 to | |
</p> </p> | |
<div class='vspace'></div></div> <div class='vspace'></div></div> | |
</p><small>Page last updated: 2012-08-03</p> | </p><small>Page last updated: 2012-08-03</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='TrackerModules'></a><h1>TrackerModules</h1> <hr><a name='TrackerModules'></a><h1>TrackerModules</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Tracker Modules are essentially just packages of audio sam <p>Tracker Modules are essentially just packages of audio sam | |
</p> </p> | |
<p class='vspace'>Tracker Module files are similar to MIDI fi <p class='vspace'>Tracker Module files are similar to MIDI fi | |
</p> </p> | |
<div class='vspace'></div><h2>Supported formats</h2> <div class='vspace'></div><h2>Supported formats</h2> | |
<p>Unity supports the four most common module file formats, n <p>Unity supports the four most common module file formats, n | |
</p> </p> | |
<div class='vspace'></div><h2>Benefits of Using Tracker Modul <div class='vspace'></div><h2>Benefits of Using Tracker Modul | |
<p>Tracker module files differ from mainstream PCM formats (< <p>Tracker module files differ from mainstream PCM formats (< | |
</p> </p> | |
<div class='vspace'></div><h2>Third Party Tools and Further R <div class='vspace'></div><h2>Third Party Tools and Further R | |
<p>Currently, the most popular tools to create and edit Track <p>Currently, the most popular tools to create and edit Track | |
</p> </p> | |
</p><small>Page last updated: 2011-11-15</p> | </p><small>Page last updated: 2011-11-15</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Scripting'></a><h1>Scripting</h1> <hr><a name='Scripting'></a><h1>Scripting</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>This brief introduction explains how to create and use scr <p>This brief introduction explains how to create and use scr | |
</p> </p> | |
<p class='vspace'>Behaviour scripts in Unity can be written i <p class='vspace'>Behaviour scripts in Unity can be written i | |
</p> </p> | |
<div class='vspace'></div><h2>Creating New Scripts</h2> <div class='vspace'></div><h2>Creating New Scripts</h2> | |
<p>Unlike other assets like Meshes or Textures, Script files <p>Unlike other assets like Meshes or Textures, Script files | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>You can edit the script by double-clicking <p class='vspace'>You can edit the script by double-clicking | |
</p> </p> | |
<p class='vspace'>These are the contents of a new, empty beha <p class='vspace'>These are the contents of a new, empty beha | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>function U <div class='vspace'></div><pre class='codelisting'>function U | |
} </pre> } </pre> | |
<p class='vspace'>A new, empty script does not do a lot on it <p class='vspace'>A new, empty script does not do a lot on it | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>function U <div class='vspace'></div><pre class='codelisting'>function U | |
print("Hello World"); print("Hello World"); | |
} </pre> } </pre> | |
<p class='vspace'>When executed, this code will print "Hello <p class='vspace'>When executed, this code will print "Hello | |
</p> </p> | |
<div class='vspace'></div><h2>Attaching scripts to objects</h <div class='vspace'></div><h2>Attaching scripts to objects</h | |
<p>Save the above script and create a new object in the Scene <p>Save the above script and create a new object in the Scene | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Now drag the script from the Project View t <p class='vspace'>Now drag the script from the Project View t | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>If you select the Cube and look at the <spa <p class='vspace'>If you select the Cube and look at the <spa | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Press <span class='doc-keyword'>Play</span> <p class='vspace'>Press <span class='doc-keyword'>Play</span> | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Manipulating the GameObject</h2 <div class='vspace'></div><h2>Manipulating the GameObject</h2 | |
<p>A <span class='doc-prop'>print()</span> statement can be v <p>A <span class='doc-prop'>print()</span> statement can be v | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>function U <div class='vspace'></div><pre class='codelisting'>function U | |
transform.Rotate(0, 5*Time.deltaTime, 0); transform.Rotate(0, 5*Time.deltaTime, 0); | |
} </pre> } </pre> | |
<p class='vspace'>If you're new to scripting, it's okay if th <p class='vspace'>If you're new to scripting, it's okay if th | |
</p> </p> | |
<div class='vspace'></div><ol><li><span class='doc-prop'>func <div class='vspace'></div><ol><li><span class='doc-prop'>func | |
</li><li><span class='doc-prop'>transform</span> is a referen </li><li><span class='doc-prop'>transform</span> is a referen | |
</li><li><span class='doc-prop'>Rotate()</span> is a function </li><li><span class='doc-prop'>Rotate()</span> is a function | |
</li><li>The numbers in-between the commas represent the degr </li><li>The numbers in-between the commas represent the degr | |
</li><li><span class='doc-prop'>Time.deltaTime</span> is a me </li><li><span class='doc-prop'>Time.deltaTime</span> is a me | |
</li></ol><p class='vspace'>With all this in mind, we can rea </li></ol><p class='vspace'>With all this in mind, we can rea | |
</p> </p> | |
<p class='vspace'>You can access lots of different Components <p class='vspace'>You can access lots of different Components | |
</p> </p> | |
<p class='vspace'>For more information about the relationship | <p class='vspace'>For more information about the relationship | |
</p> </p> | |
<div class='vspace'></div><h2>The Power of Variables</h2> <div class='vspace'></div><h2>The Power of Variables</h2> | |
<p>Our script so far will always rotate the Cube 5 degrees ea <p>Our script so far will always rotate the Cube 5 degrees ea | |
</p> </p> | |
<p class='vspace'>Instead of typing <span class='doc-prop'>5< <p class='vspace'>Instead of typing <span class='doc-prop'>5< | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>var speed <div class='vspace'></div><pre class='codelisting'>var speed | |
function Update () { function Update () { | |
transform.Rotate(0, speed*Time.deltaTime, 0); transform.Rotate(0, speed*Time.deltaTime, 0); | |
}</pre> }</pre> | |
<p class='vspace'>Now, select the Cube and look at the Inspec <p class='vspace'>Now, select the Cube and look at the Inspec | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>This variable can now be modified directly <p class='vspace'>This variable can now be modified directly | |
</p> </p> | |
<p class='vspace'>Hit Play and try modifying the <span class= <p class='vspace'>Hit Play and try modifying the <span class= | |
</p> </p> | |
<p class='vspace'>The technique of changing a variable's valu <p class='vspace'>The technique of changing a variable's valu | |
</p> </p> | |
<div class='vspace'></div><h2>Accessing Other Components</h2> <div class='vspace'></div><h2>Accessing Other Components</h2> | |
<p>When writing a script Component, you can access other comp <p>When writing a script Component, you can access other comp | |
</p> </p> | |
<div class='vspace'></div><h3>Using the GameObject members</h <div class='vspace'></div><h3>Using the GameObject members</h | |
<p>You can directly access any member of the <span class='doc <p>You can directly access any member of the <span class='doc | |
</p> </p> | |
<p class='vspace'>Typing <span class='doc-prop'>this</span> w <p class='vspace'>Typing <span class='doc-prop'>this</span> w | |
</p> </p> | |
<p class='vspace'>There are many Components that can be direc <p class='vspace'>There are many Components that can be direc | |
</p> </p> | |
<p class='vspace'>To see a list of all the Components you can <p class='vspace'>To see a list of all the Components you can | |
</p> </p> | |
<div class='vspace'></div><h3>Using <span class='doc-prop'>Ge <div class='vspace'></div><h3>Using <span class='doc-prop'>Ge | |
<p>There are many Components which are not referenced directl <p>There are many Components which are not referenced directl | |
</p> </p> | |
<p class='vspace'>Pretend you are writing <em>Script B</em> a <p class='vspace'>Pretend you are writing <em>Script B</em> a | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>scriptA = GetCompone <p class='vspace'><span class='doc-prop'>scriptA = GetCompone | |
</p> </p> | |
<p class='vspace'>For more help with using <span class='doc-p <p class='vspace'>For more help with using <span class='doc-p | |
</p> </p> | |
<div class='vspace'></div><h2>Accessing variables in other sc <div class='vspace'></div><h2>Accessing variables in other sc | |
<p>All scripts attached to your GameObjects are Components. T <p>All scripts attached to your GameObjects are Components. T | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>function S <div class='vspace'></div><pre class='codelisting'>function S | |
// Print the position of the transform component, for the // Print the position of the transform component, for the | |
Debug.Log(gameObject.GetComponent<Transform>.().posi Debug.Log(gameObject.GetComponent<Transform>.().posi | |
}</pre> }</pre> | |
<p class='vspace'>In the previous example the GetComponent< <p class='vspace'>In the previous example the GetComponent< | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>(MyClass.j <div class='vspace'></div><pre class='codelisting'>(MyClass.j | |
public var speed : float = 3.14159; public var speed : float = 3.14159; | |
(MyOtherClass.js) (MyOtherClass.js) | |
function Start () { function Start () { | |
// Print the speed variable from the MyClass script Compon // Print the speed variable from the MyClass script Compon | |
Debug.Log(gameObject.GetComponent<MyClass>.().speed) Debug.Log(gameObject.GetComponent<MyClass>.().speed) | |
}</pre> }</pre> | |
<div class='vspace'></div><h3>Accessing a variable defined in <div class='vspace'></div><h3>Accessing a variable defined in | |
<p>To access variables defined in C# scripts the compiled Ass <p>To access variables defined in C# scripts the compiled Ass | |
</p> </p> | |
<p class='vspace'>In general the code inside the "Standard As <p class='vspace'>In general the code inside the "Standard As | |
</p> </p> | |
<div class='vspace'></div><h3>Optimizing variable access</h3> <div class='vspace'></div><h3>Optimizing variable access</h3> | |
<p>In some circumstances you may be using GetComponent multip <p>In some circumstances you may be using GetComponent multip | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>(MyClass.j <div class='vspace'></div><pre class='codelisting'>(MyClass.j | |
public var speed : float = 3.14159; public var speed : float = 3.14159; | |
(MyOtherClass.js) (MyOtherClass.js) | |
private var myClass : MyClass; private var myClass : MyClass; | |
function Start () { function Start () { | |
// Get a reference to the MyClass script Component attache // Get a reference to the MyClass script Component attache | |
myClass = gameObject.GetComponent<MyClass>.(); myClass = gameObject.GetComponent<MyClass>.(); | |
} } | |
function Update () { function Update () { | |
// Verify that the reference is still valid and print the // Verify that the reference is still valid and print the | |
if(myClass != null) if(myClass != null) | |
Debug.Log (myClass.speed); Debug.Log (myClass.speed); | |
} } | |
</pre> </pre> | |
<div class='vspace'></div><h3>Static Variables</h3> <div class='vspace'></div><h3>Static Variables</h3> | |
<p>It is also possible to declare variables in your classes a <p>It is also possible to declare variables in your classes a | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>(MyClass.j <div class='vspace'></div><pre class='codelisting'>(MyClass.j | |
static public var speed : float = 3.14159; static public var speed : float = 3.14159; | |
(MyOtherClass.js) (MyOtherClass.js) | |
function Start () { function Start () { | |
Debug.Log (MyClass.speed); Debug.Log (MyClass.speed); | |
}</pre> }</pre> | |
<p class='vspace'>It is recommended to <b>not</b> use static <p class='vspace'>It is recommended to <b>not</b> use static | |
</p> </p> | |
<div class='vspace'></div><h2>Where to go from here</h2> <div class='vspace'></div><h2>Where to go from here</h2> | |
<p>This was just a short introduction on how to use scripts i <p>This was just a short introduction on how to use scripts i | |
</p> </p> | |
</p><small>Page last updated: 2012-06-28</p> | </p><small>Page last updated: 2012-06-28</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Asset Store'></a><h1>Asset Store</h1> <hr><a name='Asset Store'></a><h1>Asset Store</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity's <span class='doc-keyword'>Asset Store</span> is ho <p>Unity's <span class='doc-keyword'>Asset Store</span> is ho | |
</p> </p> | |
<div class='vspace'></div><h2>Access and Navigation</h2> <div class='vspace'></div><h2>Access and Navigation</h2> | |
<p>You can open the Asset Store window by selecting <span cla <p>You can open the Asset Store window by selecting <span cla | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>The Store provides a browser-like interface <p class='vspace'>The Store provides a browser-like interface | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>To the right of these are buttons for viewi <p class='vspace'>To the right of these are buttons for viewi | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>The Download Manager allows you to view the <p class='vspace'>The Download Manager allows you to view the | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Location of Downloaded Asset Fi <div class='vspace'></div><h2>Location of Downloaded Asset Fi | |
<p>You will rarely, if ever, need to access the files downloa <p>You will rarely, if ever, need to access the files downloa | |
</p> </p> | |
<div class='vspace'></div><pre> ~/Library/Unity/Asset Store <div class='vspace'></div><pre> ~/Library/Unity/Asset Store | |
</pre><p class='vspace'>...on the Mac and in </pre><p class='vspace'>...on the Mac and in | |
</p> </p> | |
<div class='vspace'></div><pre> C:\Users\accountName\AppData <div class='vspace'></div><pre> C:\Users\accountName\AppData | |
</pre><p class='vspace'>...on Windows. These folders contain </pre><p class='vspace'>...on Windows. These folders contain | |
</p> </p> | |
<div class='vspace'></div> <div class='vspace'></div> | |
</p><small>Page last updated: 2011-12-09</p> | </p><small>Page last updated: 2011-12-09</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Asset Server'></a><h1>Asset Server</h1> <hr><a name='Asset Server'></a><h1>Asset Server</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<h2>Unity Asset Server Overview</h2> <h2>Unity Asset Server Overview</h2> | |
<p>The <span class='doc-keyword'>Unity Asset Server</span> is <p>The <span class='doc-keyword'>Unity Asset Server</span> is | |
</p> </p> | |
<p class='vspace'>It is available only for Unity Pro, and is <p class='vspace'>It is available only for Unity Pro, and is | |
</p> </p> | |
<div class='vspace'></div><h2>New to Source Control?</h2> <div class='vspace'></div><h2>New to Source Control?</h2> | |
<p>If you have never used Source Control before, it can be a <p>If you have never used Source Control before, it can be a | |
</p> </p> | |
<p class='vspace'>In a way, the Asset Server functions as a b <p class='vspace'>In a way, the Asset Server functions as a b | |
</p> </p> | |
<p class='vspace'>Now, when your fellow developers make a cha <p class='vspace'>Now, when your fellow developers make a cha | |
</p> </p> | |
<p class='vspace'>This is the basic workflow for using the As <p class='vspace'>This is the basic workflow for using the As | |
</p> </p> | |
<div class='vspace'></div><h2>Setting up the Asset Server </h <div class='vspace'></div><h2>Setting up the Asset Server </h | |
<p>The Asset Server requires a one time server setup and a cl | <p>The Asset Server requires a one time server setup and a cl | |
</p> </p> | |
<p class='vspace'>The rest of this guide explains how to depl <p class='vspace'>The rest of this guide explains how to depl | |
</p> </p> | |
<div class='vspace'></div><h1>Daily use of the Asset Server</ <div class='vspace'></div><h1>Daily use of the Asset Server</ | |
<p>This section explains the common tasks, workflow and best <p>This section explains the common tasks, workflow and best | |
</p> </p> | |
<div class='vspace'></div><h2>Getting Started</h2> <div class='vspace'></div><h2>Getting Started</h2> | |
<p>If you are joining a team that has a lot of work stored on <p>If you are joining a team that has a lot of work stored on | |
</p> </p> | |
<div class='vspace'></div><ol><li>Create a new empty Project <div class='vspace'></div><ol><li>Create a new empty Project | |
</li><li>Go to <span class='doc-menu'>Edit->Project Settin </li><li>Go to <span class='doc-menu'>Edit->Project Settin | |
</li><li>From the menubar, select <span class='doc-menu'>Wind </li><li>From the menubar, select <span class='doc-menu'>Wind | |
</li><li>Click the <span class='doc-menu'>Connection</span> b </li><li>Click the <span class='doc-menu'>Connection</span> b | |
</li><li>Enter your user name and password (provided by your </li><li>Enter your user name and password (provided by your | |
</li><li>Click <span class='doc-menu'>Show Projects</span> an </li><li>Click <span class='doc-menu'>Show Projects</span> an | |
</li><li>Click <span class='doc-menu'>Connect</span> </li><li>Click <span class='doc-menu'>Connect</span> | |
</li><li>Click the <span class='doc-menu'>Update</span> tab </li><li>Click the <span class='doc-menu'>Update</span> tab | |
</li><li>Click the <span class='doc-menu'>Update</span> butto </li><li>Click the <span class='doc-menu'>Update</span> butto | |
</li><li>If a conflict occurs, discard all local versions </li><li>If a conflict occurs, discard all local versions | |
</li><li>Wait for the update to complete </li><li>Wait for the update to complete | |
</li><li>You are ready to go </li><li>You are ready to go | |
</li></ol><p class='vspace'>Continue reading for detailed inf </li></ol><p class='vspace'>Continue reading for detailed inf | |
</p> </p> | |
<p class='vspace'><a name='Fundamentals' id='Fundamentals'></ <p class='vspace'><a name='Fundamentals' id='Fundamentals'></ | |
</p><h2>Workflow Fundamentals</h2> </p><h2>Workflow Fundamentals</h2> | |
<p>When using the Asset Server with a multi-person team, it i <p>When using the Asset Server with a multi-person team, it i | |
</p> </p> | |
<div class='vspace'></div><h2>Understanding the Server View</ <div class='vspace'></div><h2>Understanding the Server View</ | |
<p>The <span class='doc-keyword'>Server View</span> is your w <p>The <span class='doc-keyword'>Server View</span> is your w | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>The Server View is broken into tabs: <span <p class='vspace'>The Server View is broken into tabs: <span | |
</p> </p> | |
<div class='vspace'></div><h3>Connecting to the server</h3> <div class='vspace'></div><h3>Connecting to the server</h3> | |
<p>Before you can use the asset server, you must connect to i <p>Before you can use the asset server, you must connect to i | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Here you need to fill in: <p class='vspace'>Here you need to fill in: | |
</p><ol><li>Server address </p><ol><li>Server address | |
</li><li>Username </li><li>Username | |
</li><li>Password </li><li>Password | |
</li></ol><p class='vspace'>By clicking <span class='doc-menu </li></ol><p class='vspace'>By clicking <span class='doc-menu | |
</p> </p> | |
<div class='vspace'></div><h3>Updating from the Server</h3> <div class='vspace'></div><h3>Updating from the Server</h3> | |
<p>To download all updates from the server, select the <span <p>To download all updates from the server, select the <span | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h3>Committing Changes to the Serve <div class='vspace'></div><h3>Committing Changes to the Serve | |
<p>When you have made a change to your local project and you <p>When you have made a change to your local project and you | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Now you will be able to see all the local c <p class='vspace'>Now you will be able to see all the local c | |
</p> </p> | |
<div class='vspace'></div><h3>Resolving conflicts</h3> <div class='vspace'></div><h3>Resolving conflicts</h3> | |
<p>With multiple people working on the same collection of dat <p>With multiple people working on the same collection of dat | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Here, you will be informed of each individu <p class='vspace'>Here, you will be informed of each individu | |
</p> </p> | |
<p class='vspace'><b>Note:</b> If you choose to discard your <p class='vspace'><b>Note:</b> If you choose to discard your | |
</p> </p> | |
<p class='vspace'>If you run into a conflict while you are co <p class='vspace'>If you run into a conflict while you are co | |
</p> </p> | |
<div class='vspace'></div><h3>Browsing revision history and r <div class='vspace'></div><h3>Browsing revision history and r | |
<p>The Asset Server retains all uploaded versions of an asset <p>The Asset Server retains all uploaded versions of an asset | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Here, you can see the version number and ad <p class='vspace'>Here, you can see the version number and ad | |
</p> </p> | |
<p class='vspace'>Prior to reverting, if there are any differ <p class='vspace'>Prior to reverting, if there are any differ | |
</p> </p> | |
<p class='vspace'>If you only want to abandon the changes mad <p class='vspace'>If you only want to abandon the changes mad | |
</p> </p> | |
<div class='vspace'></div><h3>Comparing asset versions</h3> <div class='vspace'></div><h3>Comparing asset versions</h3> | |
<p>If you're curious to see the differences between two parti <p>If you're curious to see the differences between two parti | |
</p> </p> | |
<p class='vspace'><em>Note</em>: this feature requires that y <p class='vspace'><em>Note</em>: this feature requires that y | |
</p><ul><li>On Windows: </p><ul><li>On Windows: | |
<ul><li>TortoiseMerge: part of <a class='urllink' href='http: <ul><li>TortoiseMerge: part of <a class='urllink' href='http: | |
</li><li><a class='urllink' href='http://winmerge.org/' rel=' </li><li><a class='urllink' href='http://winmerge.org/' rel=' | |
</li><li><a class='urllink' href='http://www.sourcegear.com/d </li><li><a class='urllink' href='http://www.sourcegear.com/d | |
</li><li><a class='urllink' href='http://www.perforce.com/per </li><li><a class='urllink' href='http://www.perforce.com/per | |
</li><li><a class='urllink' href='http://sourceforge.net/proj </li><li><a class='urllink' href='http://sourceforge.net/proj | |
</li></ul></li><li>On Mac OS X: </li></ul></li><li>On Mac OS X: | |
<ul><li><a class='urllink' href='http://www.sourcegear.com/di <ul><li><a class='urllink' href='http://www.sourcegear.com/di | |
</li><li>FileMerge: part of Apple's <a class='urllink' href=' </li><li>FileMerge: part of Apple's <a class='urllink' href=' | |
</li><li><a class='urllink' href='http://sourceforge.net/proj </li><li><a class='urllink' href='http://sourceforge.net/proj | |
</li><li><a class='urllink' href='http://www.perforce.com/per </li><li><a class='urllink' href='http://www.perforce.com/per | |
</li></ul></li></ul><div class='vspace'></div><h3>Recovering </li></ul></li></ul><div class='vspace'></div><h3>Recovering | |
<p>Deleting a local asset and committing the delete to the se <p>Deleting a local asset and committing the delete to the se | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Expand <span class='doc-menu'>Deleted Asset <p class='vspace'>Expand <span class='doc-menu'>Deleted Asset | |
</p> </p> | |
<div class='vspace'></div><h3>Best Practices & Common Iss <div class='vspace'></div><h3>Best Practices & Common Iss | |
<p>This is a compilation of best practices and solutions to p <p>This is a compilation of best practices and solutions to p | |
</p> </p> | |
<div class='vspace'></div><ol><li>Backup, Backup, Backup <div class='vspace'></div><ol><li>Backup, Backup, Backup | |
<ul><li>Maintain a backup of your database. It is very import <ul><li>Maintain a backup of your database. It is very import | |
</li></ul><div class='vspace'></div></li><li value='2' >Stop </li></ul><div class='vspace'></div></li><li value='2' >Stop | |
<ul><li>This can prevent "fast shutdowns" from being generate <ul><li>This can prevent "fast shutdowns" from being generate | |
</li></ul><div class='vspace'></div></li><li value='3' >Reset </li></ul><div class='vspace'></div></li><li value='3' >Reset | |
<ul><li>You can reset your password directly from a shell, co <ul><li>You can reset your password directly from a shell, co | |
</li></ul><div class='vspace'></div></li><li value='4' >Can't </li></ul><div class='vspace'></div></li><li value='4' >Can't | |
<ul><li>The password may have expired. Try resetting your pas <ul><li>The password may have expired. Try resetting your pas | |
</li><li>Also the username is case sensitive: "Admin" != "adm </li><li>Also the username is case sensitive: "Admin" != "adm | |
</li><li>Make sure the server is actually running: </li><li>Make sure the server is actually running: | |
<ul><li>On OS X or Linux you can type on the terminal: ps -au <ul><li>On OS X or Linux you can type on the terminal: ps -au | |
</li><li>On Windows you can use the Task Manager. </li><li>On Windows you can use the Task Manager. | |
</li></ul></li><li>Verify that the Asset Server is not runnin </li></ul></li><li>Verify that the Asset Server is not runnin | |
</li></ul><div class='vspace'></div></li><li value='5' >The A </li></ul><div class='vspace'></div></li><li value='5' >The A | |
<ul><li>The asset server can run OK on 64-bit Linux machines <ul><li>The asset server can run OK on 64-bit Linux machines | |
</li></ul><div class='vspace'></div></li><li value='6' >Use t </li></ul><div class='vspace'></div></li><li value='6' >Use t | |
<ul><li>Windows: <ul><li>Windows: | |
<ul><li><span class='ProgramFiles'>\Unity\AssetServer\log</sp <ul><li><span class='ProgramFiles'>\Unity\AssetServer\log</sp | |
</li></ul></li><li>OS X: </li></ul></li><li>OS X: | |
<ul><li>/Library/UnityAssetServer/log <ul><li>/Library/UnityAssetServer/log | |
</li></ul></li></ul></li></ol><div class='vspace'></div><h2>A </li></ul></li></ul></li></ol><div class='vspace'></div><h2>A | |
<p>You should now be equipped with the knowledge you need to <p>You should now be equipped with the knowledge you need to | |
</p> </p> | |
</p><small>Page last updated: 2011-10-31</p> | </p><small>Page last updated: 2011-10-31</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Asset Cache Server'></a><h1>Asset Cache Server</ <hr><a name='Asset Cache Server'></a><h1>Asset Cache Server</ | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity has a completely automatic asset pipeline. Whenever <p>Unity has a completely automatic asset pipeline. Whenever | |
</p> </p> | |
<p class='vspace'>The time it takes to import assets can be d <p class='vspace'>The time it takes to import assets can be d | |
</p> </p> | |
<p class='vspace'>Each asset import is cached based on <p class='vspace'>Each asset import is cached based on | |
</p><ul><li>The asset file itself </p><ul><li>The asset file itself | |
</li><li>The import settings </li><li>The import settings | |
</li><li>Asset importer version </li><li>Asset importer version | |
</li><li>The current platform. </li><li>The current platform. | |
</li></ul><p class='vspace'>If any of the above change, the a </li></ul><p class='vspace'>If any of the above change, the a | |
</p> </p> | |
<p class='vspace'>When you enable the cache server in the pre <p class='vspace'>When you enable the cache server in the pre | |
</p> </p> | |
<p class='vspace'>Note that once the cache server is set up, <p class='vspace'>Note that once the cache server is set up, | |
</p> </p> | |
<div class='vspace'></div><h2>How to set up a <span class='do <div class='vspace'></div><h2>How to set up a <span class='do | |
<p>Setting up the Cache Server couldn't be easier. All you ne <p>Setting up the Cache Server couldn't be easier. All you ne | |
</p><div class='indent'><img class='figure' src='Images/manua </p><div class='indent'><img class='figure' src='Images/manua | |
</div><p class='vspace'>This can be found in <span class='doc </div><p class='vspace'>This can be found in <span class='doc | |
</p> </p> | |
<p class='vspace'>If you are hosting the Cache Server on your <p class='vspace'>If you are hosting the Cache Server on your | |
</p> </p> | |
<div class='vspace'></div><h2>How to set up a <span class='do <div class='vspace'></div><h2>How to set up a <span class='do | |
<p>Admins need to set up the <span class='doc-keyword'>Cache <p>Admins need to set up the <span class='doc-keyword'>Cache | |
</p> </p> | |
<p class='vspace'>You need to: <p class='vspace'>You need to: | |
</p><ul><li>Download the Cache Server <a class='urllink' href </p><ul><li>Download the Cache Server <a class='urllink' href | |
</li><li>Unzip the file, after which you should see something </li><li>Unzip the file, after which you should see something | |
</li></ul><div class='indent'><img class='figure' src='Images </li></ul><div class='indent'><img class='figure' src='Images | |
</div><div class='vspace'></div><ul><li>Depending on your ope </div><div class='vspace'></div><ul><li>Depending on your ope | |
</li><li>You will see a terminal window, indicating that the </li><li>You will see a terminal window, indicating that the | |
</li></ul><div class='indent'><img class='figure' src='Images </li></ul><div class='indent'><img class='figure' src='Images | |
</div><p class='vspace'>The <span class='doc-keyword'>Cache S </div><p class='vspace'>The <span class='doc-keyword'>Cache S | |
</p> </p> | |
<div class='vspace'></div><h2>Installing the Cache Server as <div class='vspace'></div><h2>Installing the Cache Server as | |
<p>The provided <code>.sh</code> and <code>.cmd</code> script <p>The provided <code>.sh</code> and <code>.cmd</code> script | |
The cache server can be safely killed and restarted at any ti The cache server can be safely killed and restarted at any ti | |
</p> </p> | |
<div class='vspace'></div><h2>Cache Server Configuration</h2> <div class='vspace'></div><h2>Cache Server Configuration</h2> | |
<p>If you simply start the Cache Server by double clicking th <p>If you simply start the Cache Server by double clicking th | |
</p> </p> | |
<p class='vspace'><code>./RunOSX.command --path ~/mycachePath <p class='vspace'><code>./RunOSX.command --path ~/mycachePath | |
</p> </p> | |
<p class='vspace'><code>--path</code> lets you specify a cach <p class='vspace'><code>--path</code> lets you specify a cach | |
</p> </p> | |
<div class='vspace'></div><h2>Recommendations for the machine <div class='vspace'></div><h2>Recommendations for the machine | |
<p>We recommend equipping the machine with a lot of RAM. For <p>We recommend equipping the machine with a lot of RAM. For | |
</p> </p> | |
<p class='vspace'>One of the main distinctions between the Ca <p class='vspace'>One of the main distinctions between the Ca | |
</p> </p> | |
<div class='vspace'></div> <div class='vspace'></div> | |
</p><small>Page last updated: 2012-05-15</p> | </p><small>Page last updated: 2012-05-15</p><br/> | |
<script type="text/javascript"> | <hr><a name='Cache Server FAQ'></a><h1>Cache Server FAQ</h1> | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Cache Server FAQ'></a><h1>Cache Server FAQ</h1> < | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<h3>Will the size of my Cache Server database grow indefinite <h3>Will the size of my Cache Server database grow indefinite | |
<p>The Cache Server removes assets that have not been used fo <p>The Cache Server removes assets that have not been used fo | |
</p> </p> | |
<div class='vspace'></div><h3>What changes will cause the imp <div class='vspace'></div><h3>What changes will cause the imp | |
<p>When Unity is about to import an asset, it generates an MD <p>When Unity is about to import an asset, it generates an MD | |
</p> </p> | |
<p class='vspace'>For a texture this consists of: <p class='vspace'>For a texture this consists of: | |
- The source asset: "myTexture.psd" file - The source asset: "myTexture.psd" file | |
- The meta file: "myTexture.psd.meta" (Stores all importer se - The meta file: "myTexture.psd.meta" (Stores all importer se | |
- The internal version number of the texture importer - The internal version number of the texture importer | |
- A hash of version numbers of all <span style='font-size: 11 - A hash of version numbers of all <span style='font-size: 11 | |
class='createlink' href='http://docwiki.hq.unity3d.com/in class='createlink' href='http://docwiki.hq.unity3d.com/in | |
</p> </p> | |
<p class='vspace'>If that hash is different from what's store <p class='vspace'>If that hash is different from what's store | |
</p> </p> | |
<div class='vspace'></div><h3>How do I work with Asset depend <div class='vspace'></div><h3>How do I work with Asset depend | |
<p>The Cache Server does not handle dependencies. Unity's ass <p>The Cache Server does not handle dependencies. Unity's ass | |
</p> </p> | |
<p class='vspace'>It is also easy to use <span class='doc-pro <p class='vspace'>It is also easy to use <span class='doc-pro | |
</p> </p> | |
<p class='vspace'>In practice there are plenty of ways you ca <p class='vspace'>In practice there are plenty of ways you ca | |
You can use: You can use: | |
</p><div class='indent'>The Path of the imported asset </p><div class='indent'>The Path of the imported asset | |
</div><div class='indent'>Any import settings of the asset </div><div class='indent'>Any import settings of the asset | |
</div><div class='indent'>The source asset itself or any data </div><div class='indent'>The source asset itself or any data | |
</div><div class='vspace'></div><h3>Working with materials</h </div><div class='vspace'></div><h3>Working with materials</h | |
<p>Modifying materials that already exist might cause trouble <p>Modifying materials that already exist might cause trouble | |
</p> </p> | |
</p><small>Page last updated: 2012-05-29</p> | </p><small>Page last updated: 2012-05-29</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Behind the Scenes'></a><h1>Behind the Scenes</h1 <hr><a name='Behind the Scenes'></a><h1>Behind the Scenes</h1 | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity automatically imports assets and manages various kin <p>Unity automatically imports assets and manages various kin | |
</p> </p> | |
<p class='vspace'>When you place an Asset such as a texture i <p class='vspace'>When you place an Asset such as a texture i | |
</p> </p> | |
<p class='vspace'>Using an internal format for assets allows <p class='vspace'>Using an internal format for assets allows | |
</p> </p> | |
<p class='vspace'>Unity allows you to create folders in the P <p class='vspace'>Unity allows you to create folders in the P | |
</p> </p> | |
<p class='vspace'>When backing up a project, you should <b>al <p class='vspace'>When backing up a project, you should <b>al | |
</p> </p> | |
</p><small>Page last updated: 2011-11-15</p> | </p><small>Page last updated: 2011-11-15</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Creating Gameplay'></a><h1>Creating Gameplay</h1 <hr><a name='Creating Gameplay'></a><h1>Creating Gameplay</h1 | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity empowers game designers to make games. What's reall <p>Unity empowers game designers to make games. What's reall | |
</p> </p> | |
<p class='vspace'>This section will explain the core concepts <p class='vspace'>This section will explain the core concepts | |
</p> </p> | |
<div class='vspace'></div><ul><li class='toclink'><a href="Ma <div class='vspace'></div><ul><li class='toclink'><a href="Ma | |
</li><li class='toclink'><a href="Manual/Input.html">Input</a </li><li class='toclink'><a href="Manual/Input.html">Input</a | |
</li><li class='toclink'><a href="Manual/Transforms.html">Tra </li><li class='toclink'><a href="Manual/Transforms.html">Tra | |
</li><li class='toclink'><a href="Manual/Physics.html">Physic </li><li class='toclink'><a href="Manual/Physics.html">Physic | |
</li><li class='toclink'><a href="Manual/RandomNumbers.html"> </li><li class='toclink'><a href="Manual/RandomNumbers.html"> | |
</li><li class='toclink'><a href="Manual/ParticleSystems.html </li><li class='toclink'><a href="Manual/ParticleSystems.html | |
<ul><li class='toclink'><a href="Manual/ParticleSystemCurveEd <ul><li class='toclink'><a href="Manual/ParticleSystemCurveEd | |
</li><li class='toclink'><a href="Manual/ParticleSystemColorE </li><li class='toclink'><a href="Manual/ParticleSystemColorE | |
</li><li class='toclink'><a href="Manual/GradientEditor.html" </li><li class='toclink'><a href="Manual/GradientEditor.html" | |
</li><li class='toclink'><a href="Manual/ParticleSystemInspec </li><li class='toclink'><a href="Manual/ParticleSystemInspec | |
</li><li class='toclink'><a href="Manual/ParticleSystemModule </li><li class='toclink'><a href="Manual/ParticleSystemModule | |
</li></ul></li></ul><div class='specific-u30' style='display: | </li></ul></li></ul> | |
<dl><dd><ul><li class='toclink'><a href="Manual/ParticleSyste | <div class='specific-u40' style='display: block;' id='specifi | |
> <dl><dd><ul><li class='toclink'><a href="Manual/ParticleSyste | |
</li></ul></dd></dl></div> </li></ul></dd></dl></div> | |
< | |
<dl><dd><ul><li class='toclink'><a href="Manual/ParticleSyste <dl><dd><ul><li class='toclink'><a href="Manual/ParticleSyste | |
</li></ul></dd></dl><div class='specific-u30' style='display: | </li></ul></dd></dl> | |
<ul><li class='toclink'><a href="Manual/Animation.html">Anima | <div class='specific-u40' style='display: block;' id='specifi | |
</li><li class='toclink'><a href="Manual/AnimationScripting.h | <ul><li class='toclink'><a href="Manual/AnimationEditorGuide4 | |
> </li><li class='toclink'><a href="Manual/AnimationScripting40 | |
</li></ul></div> </li></ul></div> | |
< | |
<ul><li class='toclink'><a href="Manual/NavmeshandPathfinding <ul><li class='toclink'><a href="Manual/NavmeshandPathfinding | |
<ul><li class='toclink'><a href="Manual/Navmeshbaking.html">N <ul><li class='toclink'><a href="Manual/Navmeshbaking.html">N | |
</li></ul></li><li class='toclink'><a href="Manual/Sound.html </li></ul></li><li class='toclink'><a href="Manual/Sound.html | |
</li><li class='toclink'><a href="Manual/GameInterfaceElement </li><li class='toclink'><a href="Manual/GameInterfaceElement | |
</li><li class='toclink'><a href="Manual/NetworkedMultiplayer </li><li class='toclink'><a href="Manual/NetworkedMultiplayer | |
</li></ul><div class='specific-ios' style='display: block;' i </li></ul><div class='specific-ios' style='display: block;' i | |
</div> </div> | |
</p><small>Page last updated: 2010-06-30</p> | </p><small>Page last updated: 2010-06-30</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Instantiating Prefabs'></a><h1>Instantiating Pre <hr><a name='Instantiating Prefabs'></a><h1>Instantiating Pre | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>By this point you should understand the concept of <span c <p>By this point you should understand the concept of <span c | |
</p> </p> | |
<p class='vspace'>Prefabs come in very handy when you want to <p class='vspace'>Prefabs come in very handy when you want to | |
</p> </p> | |
<div class='vspace'></div><ul><li>You can instantiate a Prefa <div class='vspace'></div><ul><li>You can instantiate a Prefa | |
</li><li>You can set up, test, and modify the Prefab quickly </li><li>You can set up, test, and modify the Prefab quickly | |
</li><li>You can change the Prefab being instanced without ch </li><li>You can change the Prefab being instanced without ch | |
</li></ul><div class='vspace'></div><h2>Common Scenarios</h2> </li></ul><div class='vspace'></div><h2>Common Scenarios</h2> | |
<p>To illustrate the strength of Prefabs, let's consider some <p>To illustrate the strength of Prefabs, let's consider some | |
</p> </p> | |
<div class='vspace'></div><ol><li>Building a wall out of a si <div class='vspace'></div><ol><li>Building a wall out of a si | |
</li><li>A rocket launcher instantiates a flying rocket Prefa </li><li>A rocket launcher instantiates a flying rocket Prefa | |
</li><li>A robot exploding to many pieces. The complete, oper </li><li>A robot exploding to many pieces. The complete, oper | |
</li></ol><div class='vspace'></div><h3>Building a wall</h3> </li></ol><div class='vspace'></div><h3>Building a wall</h3> | |
<p>This explanation will illustrate the advantages of using a <p>This explanation will illustrate the advantages of using a | |
</p> </p> | |
<p class='vspace'>First, lets build a brick wall from code: <p class='vspace'>First, lets build a brick wall from code: | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>function S <div class='vspace'></div><pre class='codelisting'>function S | |
for (var y = 0; y < 5; y++) { for (var y = 0; y < 5; y++) { | |
for (var x = 0; x < 5; x++) { for (var x = 0; x < 5; x++) { | |
var cube = GameObject.CreatePrimitive(PrimitiveTy var cube = GameObject.CreatePrimitive(PrimitiveTy | |
cube.AddComponent(Rigidbody); cube.AddComponent(Rigidbody); | |
cube.transform.position = Vector3 (x, y, 0); cube.transform.position = Vector3 (x, y, 0); | |
} } | |
} } | |
} </pre> } </pre> | |
<div class='vspace'></div><ul><li>To use the above script we <div class='vspace'></div><ul><li>To use the above script we | |
</li><li>Create an empty GameObject with <span class='doc-men </li><li>Create an empty GameObject with <span class='doc-men | |
</li></ul><p class='vspace'>If you execute that code, you wil </li></ul><p class='vspace'>If you execute that code, you wil | |
</p> </p> | |
<p class='vspace'>If you create a Prefab and perform all your <p class='vspace'>If you create a Prefab and perform all your | |
</p> </p> | |
<p class='vspace'>If you're using a Prefab for each individua <p class='vspace'>If you're using a Prefab for each individua | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>var cube : <div class='vspace'></div><pre class='codelisting'>var cube : | |
function Start () { function Start () { | |
for (var y = 0; y < 5; y++) { for (var y = 0; y < 5; y++) { | |
for (var x = 0; x < 5; x++) { for (var x = 0; x < 5; x++) { | |
var cube = Instantiate(cube, Vector3 (x, y, 0), Q var cube = Instantiate(cube, Vector3 (x, y, 0), Q | |
} } | |
} } | |
} </pre> } </pre> | |
<p class='vspace'>This is not only very clean but also very r <p class='vspace'>This is not only very clean but also very r | |
</p> </p> | |
<p class='vspace'>Now we only need to create the Prefab, whic <p class='vspace'>Now we only need to create the Prefab, whic | |
</p> </p> | |
<div class='vspace'></div><ol><li>Choose <span class='doc-men <div class='vspace'></div><ol><li>Choose <span class='doc-men | |
</li><li>Choose <span class='doc-menu'>Component->Physics- </li><li>Choose <span class='doc-menu'>Component->Physics- | |
</li><li>Choose <span class='doc-menu'>Assets->Create Pref </li><li>Choose <span class='doc-menu'>Assets->Create Pref | |
</li><li>In the <span class='doc-keyword'>Project View</span> </li><li>In the <span class='doc-keyword'>Project View</span> | |
</li><li>Drag the cube you created in the <span class='doc-ke </li><li>Drag the cube you created in the <span class='doc-ke | |
</li><li>With the Prefab created, you can safely delete the C </li><li>With the Prefab created, you can safely delete the C | |
</li></ol><p class='vspace'>We've created our Brick Prefab, s </li></ol><p class='vspace'>We've created our Brick Prefab, s | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Now drag the "Brick" Prefab from the Projec <p class='vspace'>Now drag the "Brick" Prefab from the Projec | |
</p> </p> | |
<p class='vspace'>This is a workflow pattern that can be used <p class='vspace'>This is a workflow pattern that can be used | |
</p> </p> | |
<p class='vspace'>But because you are using a Prefab now, you <p class='vspace'>But because you are using a Prefab now, you | |
</p> </p> | |
<div class='vspace'></div><h3>Instantiating rockets & exp <div class='vspace'></div><h3>Instantiating rockets & exp | |
<p>Here's how Prefabs fit into this scenario: <p>Here's how Prefabs fit into this scenario: | |
</p> </p> | |
<div class='vspace'></div><ol><li>A rocket launcher instantia <div class='vspace'></div><ol><li>A rocket launcher instantia | |
</li><li>The rocket impacts and instantiates an explosion Pre </li><li>The rocket impacts and instantiates an explosion Pre | |
</li></ol><p class='vspace'>While it would be possible to bui </li></ol><p class='vspace'>While it would be possible to bui | |
</p> </p> | |
<p class='vspace'>Aside from being easier to use, you can upd <p class='vspace'>Aside from being easier to use, you can upd | |
</p> </p> | |
<p class='vspace'>This script shows how to launch a rocket us <p class='vspace'>This script shows how to launch a rocket us | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>// Require <div class='vspace'></div><pre class='codelisting'>// Require | |
// This way we the user can not assign a prefab without rigid // This way we the user can not assign a prefab without rigid | |
var rocket : Rigidbody; var rocket : Rigidbody; | |
var speed = 10.0; var speed = 10.0; | |
function FireRocket () { function FireRocket () { | |
var rocketClone : Rigidbody = Instantiate(rocket, transfo var rocketClone : Rigidbody = Instantiate(rocket, transfo | |
rocketClone.velocity = transform.forward * speed; rocketClone.velocity = transform.forward * speed; | |
// You can also acccess other components / scripts of the // You can also acccess other components / scripts of the | |
rocketClone.GetComponent(MyRocketScript).DoSomething(); rocketClone.GetComponent(MyRocketScript).DoSomething(); | |
} } | |
// Calls the fire method when holding down ctrl or mouse // Calls the fire method when holding down ctrl or mouse | |
function Update () { function Update () { | |
if (Input.GetButtonDown("Fire1")) { if (Input.GetButtonDown("Fire1")) { | |
FireRocket(); FireRocket(); | |
} } | |
} </pre> } </pre> | |
<div class='vspace'></div><h3>Replacing a character with a ra <div class='vspace'></div><h3>Replacing a character with a ra | |
<p>Let's say you have a fully rigged enemy character and he d <p>Let's say you have a fully rigged enemy character and he d | |
</p> </p> | |
<p class='vspace'>A far better approach is to immediately del <p class='vspace'>A far better approach is to immediately del | |
</p> </p> | |
<p class='vspace'>Any of these options can be achieved with a <p class='vspace'>Any of these options can be achieved with a | |
</p> </p> | |
<p class='vspace'>The important part to remember is that the <p class='vspace'>The important part to remember is that the | |
</p> </p> | |
<p class='vspace'>To build a wrecked airplane Prefab, the typ <p class='vspace'>To build a wrecked airplane Prefab, the typ | |
</p><ol><li>Model your airplane with lots of different parts </p><ol><li>Model your airplane with lots of different parts | |
</li><li>Create an empty Scene </li><li>Create an empty Scene | |
</li><li>Drag the model into the empty Scene </li><li>Drag the model into the empty Scene | |
</li><li>Add Rigidbodies to all parts, by selecting all the p </li><li>Add Rigidbodies to all parts, by selecting all the p | |
</li><li>Add Box Colliders to all parts by selecting all the </li><li>Add Box Colliders to all parts by selecting all the | |
</li><li>For an extra special effect, add a smoke-like Partic </li><li>For an extra special effect, add a smoke-like Partic | |
</li><li>Now you have an airplane with multiple exploded part </li><li>Now you have an airplane with multiple exploded part | |
</li><li>Choose <span class='doc-menu'>Assets->Create Pref </li><li>Choose <span class='doc-menu'>Assets->Create Pref | |
</li><li>Drag the root GameObject containing all the airplane </li><li>Drag the root GameObject containing all the airplane | |
</li></ol><div class='vspace'></div><pre class='codelisting'> </li></ol><div class='vspace'></div><pre class='codelisting'> | |
// As an example, we turn the game object into a wreck after // As an example, we turn the game object into a wreck after | |
function Start () { function Start () { | |
yield WaitForSeconds(3); yield WaitForSeconds(3); | |
KillSelf(); KillSelf(); | |
} } | |
// Calls the fire method when holding down ctrl or mouse // Calls the fire method when holding down ctrl or mouse | |
function KillSelf () { function KillSelf () { | |
// Instantiate the wreck game object at the same position // Instantiate the wreck game object at the same position | |
var wreckClone = Instantiate(wreck, transform.position, t var wreckClone = Instantiate(wreck, transform.position, t | |
// Sometimes we need to carry over some variables from th // Sometimes we need to carry over some variables from th | |
// to the wreck // to the wreck | |
wreckClone.GetComponent(MyScript).someVariable = GetCompo wreckClone.GetComponent(MyScript).someVariable = GetCompo | |
// Kill ourselves // Kill ourselves | |
Destroy(gameObject); Destroy(gameObject); | |
} </pre> } </pre> | |
<p class='vspace'>The First Person Shooter tutorial explains <p class='vspace'>The First Person Shooter tutorial explains | |
</p> </p> | |
<div class='vspace'></div><h3>Placing a bunch of objects in a <div class='vspace'></div><h3>Placing a bunch of objects in a | |
<p>Lets say you want to place a bunch of objects in a grid or <p>Lets say you want to place a bunch of objects in a grid or | |
</p> </p> | |
<div class='vspace'></div><ol><li>Building an object complete <div class='vspace'></div><ol><li>Building an object complete | |
</li><li>Make the fully rigged object, duplicate it and place </li><li>Make the fully rigged object, duplicate it and place | |
</li></ol><p class='vspace'>So use <span class='doc-prop'>Ins </li></ol><p class='vspace'>So use <span class='doc-prop'>Ins | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>// Instant <div class='vspace'></div><pre class='codelisting'>// Instant | |
var prefab : GameObject; var prefab : GameObject; | |
var numberOfObjects = 20; var numberOfObjects = 20; | |
var radius = 5; var radius = 5; | |
function Start () { function Start () { | |
for (var i = 0; i < numberOfObjects; i++) { for (var i = 0; i < numberOfObjects; i++) { | |
var angle = i * Mathf.PI * 2 / numberOfObjects; var angle = i * Mathf.PI * 2 / numberOfObjects; | |
var pos = Vector3 (Mathf.Cos(angle), 0, Mathf.Sin(ang var pos = Vector3 (Mathf.Cos(angle), 0, Mathf.Sin(ang | |
Instantiate(prefab, pos, Quaternion.identity); Instantiate(prefab, pos, Quaternion.identity); | |
} } | |
} </pre> } </pre> | |
<div class='vspace'></div><pre class='codelisting'>// Instant <div class='vspace'></div><pre class='codelisting'>// Instant | |
var prefab : GameObject; var prefab : GameObject; | |
var gridX = 5; var gridX = 5; | |
var gridY = 5; var gridY = 5; | |
var spacing = 2.0; var spacing = 2.0; | |
function Start () { function Start () { | |
for (var y = 0; y < gridY; y++) { for (var y = 0; y < gridY; y++) { | |
for (var x=0;x<gridX;x++) { for (var x=0;x<gridX;x++) { | |
var pos = Vector3 (x, 0, y) * spacing; var pos = Vector3 (x, 0, y) * spacing; | |
Instantiate(prefab, pos, Quaternion.identity); Instantiate(prefab, pos, Quaternion.identity); | |
} } | |
} } | |
} </pre> } </pre> | |
</p><small>Page last updated: 2010-06-30</p> | </p><small>Page last updated: 2010-06-30</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Input'></a><h1>Input</h1> <hr><a name='Input'></a><h1>Input</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<a class='desktopRef' id='desktopRef' href="javascript:ShowHi <a class='desktopRef' id='desktopRef' href="javascript:ShowHi | |
<div class='specific-desktop' style='display: block;' id='spe <div class='specific-desktop' style='display: block;' id='spe | |
<p class='vspace'><b>Note:</b> Keyboard, joystick and gamepad <p class='vspace'><b>Note:</b> Keyboard, joystick and gamepad | |
</p> </p> | |
<p class='vspace'>Unity supports keyboard, joystick and gamep <p class='vspace'>Unity supports keyboard, joystick and gamep | |
</p> </p> | |
<p class='vspace'>Virtual axes and buttons can be created in <p class='vspace'>Virtual axes and buttons can be created in | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>You can setup joysticks, gamepads, keyboard <p class='vspace'>You can setup joysticks, gamepads, keyboard | |
</p> </p> | |
<p class='vspace'>From scripts, all virtual axes are accessed <p class='vspace'>From scripts, all virtual axes are accessed | |
</p> </p> | |
<p class='vspace'>Every project has the following default inp <p class='vspace'>Every project has the following default inp | |
</p><ul><li><span class='doc-prop'>Horizontal</span> and <spa </p><ul><li><span class='doc-prop'>Horizontal</span> and <spa | |
</li><li><span class='doc-prop'>Fire1</span>, <span class='do </li><li><span class='doc-prop'>Fire1</span>, <span class='do | |
</li><li><span class='doc-prop'>Mouse X</span> and <span clas </li><li><span class='doc-prop'>Mouse X</span> and <span clas | |
</li><li><span class='doc-prop'>Window Shake X</span> and <sp </li><li><span class='doc-prop'>Window Shake X</span> and <sp | |
</li></ul><div class='vspace'></div><h3>Adding new Input Axes </li></ul><div class='vspace'></div><h3>Adding new Input Axes | |
<p>If you want to add new virtual axes go to the <span class= <p>If you want to add new virtual axes go to the <span class= | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>You map each axis to two buttons on a joyst <p class='vspace'>You map each axis to two buttons on a joyst | |
</p> </p> | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><span class='doc-prop'>Name</span></td <tr ><td align='left'><span class='doc-prop'>Name</span></td | |
<tr ><td align='left'><span class='doc-prop'>Descriptive Nam <tr ><td align='left'><span class='doc-prop'>Descriptive Nam | |
<tr ><td align='left'><span class='doc-prop'>Descriptive Neg <tr ><td align='left'><span class='doc-prop'>Descriptive Neg | |
<tr ><td align='left'><span class='doc-prop'>Negative Button <tr ><td align='left'><span class='doc-prop'>Negative Button | |
<tr ><td align='left'><span class='doc-prop'>Positive Button <tr ><td align='left'><span class='doc-prop'>Positive Button | |
<tr ><td align='left'><span class='doc-prop'>Alt Negative Bu <tr ><td align='left'><span class='doc-prop'>Alt Negative Bu | |
<tr ><td align='left'><span class='doc-prop'>Alt Positive Bu <tr ><td align='left'><span class='doc-prop'>Alt Positive Bu | |
<tr ><td align='left'><span class='doc-prop'>Gravity</span>< <tr ><td align='left'><span class='doc-prop'>Gravity</span>< | |
<tr ><td align='left'><span class='doc-prop'>Dead</span></td <tr ><td align='left'><span class='doc-prop'>Dead</span></td | |
<tr ><td align='left'><span class='doc-prop'>Sensitivity</sp <tr ><td align='left'><span class='doc-prop'>Sensitivity</sp | |
<tr ><td align='left'><span class='doc-prop'>Snap</span></td <tr ><td align='left'><span class='doc-prop'>Snap</span></td | |
<tr ><td align='left'><span class='doc-prop'>Invert</span></ <tr ><td align='left'><span class='doc-prop'>Invert</span></ | |
<tr ><td align='left'><span class='doc-prop'>Type</span></td <tr ><td align='left'><span class='doc-prop'>Type</span></td | |
<tr ><td align='left'><span class='doc-prop'>Axis</span></td <tr ><td align='left'><span class='doc-prop'>Axis</span></td | |
<tr ><td align='left'><span class='doc-prop'>Joy Num</span>< <tr ><td align='left'><span class='doc-prop'>Joy Num</span>< | |
</table> </table> | |
<p class='vspace'>Use these settings to fine tune the look an <p class='vspace'>Use these settings to fine tune the look an | |
</p> </p> | |
<div class='vspace'></div><h3>Using Input Axes from Scripts</ <div class='vspace'></div><h3>Using Input Axes from Scripts</ | |
<p>You can query the current state from a script like this: <p>You can query the current state from a script like this: | |
</p> </p> | |
<p class='vspace'><code class='escaped'>value = Input.GetAxis <p class='vspace'><code class='escaped'>value = Input.GetAxis | |
</p> </p> | |
<p class='vspace'>An axis has a value between -1 and 1. The n <p class='vspace'>An axis has a value between -1 and 1. The n | |
This is the case for joystick input and keyboard input. This is the case for joystick input and keyboard input. | |
</p> </p> | |
<p class='vspace'>However, Mouse Delta and Window Shake Delta <p class='vspace'>However, Mouse Delta and Window Shake Delta | |
</p> </p> | |
<p class='vspace'>It is possible to create multiple axes with <p class='vspace'>It is possible to create multiple axes with | |
</p> </p> | |
<div class='vspace'></div><h3>Button Names</h3> <div class='vspace'></div><h3>Button Names</h3> | |
<p>To map a key to an axis, you have to enter the key's name <p>To map a key to an axis, you have to enter the key's name | |
</p> </p> | |
<p class='vspace'>The names of keys follow this convention: <p class='vspace'>The names of keys follow this convention: | |
</p><ul><li>Normal keys: "a", "b", "c" ... </p><ul><li>Normal keys: "a", "b", "c" ... | |
</li><li>Number keys: "1", "2", "3", ... </li><li>Number keys: "1", "2", "3", ... | |
</li><li>Arrow keys: "up", "down", "left", "right" </li><li>Arrow keys: "up", "down", "left", "right" | |
</li><li>Keypad keys: "[1]", "[2]", "[3]", "[+]", "[equals]" </li><li>Keypad keys: "[1]", "[2]", "[3]", "[+]", "[equals]" | |
</li><li>Modifier keys: "right shift", "left shift", "right c </li><li>Modifier keys: "right shift", "left shift", "right c | |
</li><li>Mouse Buttons: "mouse 0", "mouse 1", "mouse 2", ... </li><li>Mouse Buttons: "mouse 0", "mouse 1", "mouse 2", ... | |
</li><li>Joystick Buttons (from any joystick): "joystick butt </li><li>Joystick Buttons (from any joystick): "joystick butt | |
</li><li>Joystick Buttons (from a specific joystick): "joysti </li><li>Joystick Buttons (from a specific joystick): "joysti | |
</li><li>Special keys: "backspace", "tab", "return", "escape" </li><li>Special keys: "backspace", "tab", "return", "escape" | |
</li><li>Function keys: "f1", "f2", "f3", ... </li><li>Function keys: "f1", "f2", "f3", ... | |
</li></ul><p class='vspace'>The names used to identify the ke </li></ul><p class='vspace'>The names used to identify the ke | |
</p> </p> | |
<p class='vspace'><code class='escaped'>value = Input.GetKey <p class='vspace'><code class='escaped'>value = Input.GetKey | |
</p></div> </p></div> | |
<div class='vspace'></div><h1>Mobile Input</h1> <div class='vspace'></div><h1>Mobile Input</h1> | |
<p>On iOS and Android, the <a class='urllink' href='ScriptRef <p>On iOS and Android, the <a class='urllink' href='ScriptRef | |
</p> </p> | |
<p class='vspace'>Access to keyboard on mobile devices is pro <p class='vspace'>Access to keyboard on mobile devices is pro | |
</p><h2>Multi-Touch Screen</h2> </p><h2>Multi-Touch Screen</h2> | |
<p>The iPhone and iPod Touch devices are capable of tracking <p>The iPhone and iPod Touch devices are capable of tracking | |
</p> </p> | |
<div class='vspace'></div><div class='specific-android' style <div class='vspace'></div><div class='specific-android' style | |
<p>Android devices don't have a unified limit on how many fin <p>Android devices don't have a unified limit on how many fin | |
</p></div> </p></div> | |
<p class='vspace'>Each finger touch is represented by an <a c <p class='vspace'>Each finger touch is represented by an <a c | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>fingerId</span> <tr ><td align='left'><span class='doc-prop'>fingerId</span> | |
<tr ><td align='left'><span class='doc-prop'>position</span> <tr ><td align='left'><span class='doc-prop'>position</span> | |
<tr ><td align='left'><span class='doc-prop'>deltaPosition</ <tr ><td align='left'><span class='doc-prop'>deltaPosition</ | |
<tr ><td align='left'><span class='doc-prop'>deltaTime</span <tr ><td align='left'><span class='doc-prop'>deltaTime</span | |
<tr ><td align='left'><span class='doc-prop'>tapCount</span> <tr ><td align='left'><span class='doc-prop'>tapCount</span> | |
<tr ><td align='left'><span class='doc-prop'>phase</span></t <tr ><td align='left'><span class='doc-prop'>phase</span></t | |
</table> </table> | |
<p class='vspace'>Phase can be one of the following: <p class='vspace'>Phase can be one of the following: | |
</p><table ><tr ><td align='left'><span class='doc-prop'>Beg </p><table ><tr ><td align='left'><span class='doc-prop'>Beg | |
<tr ><td align='left'><span class='doc-prop'>Moved</span></t <tr ><td align='left'><span class='doc-prop'>Moved</span></t | |
<tr ><td align='left'><span class='doc-prop'>Stationary</spa <tr ><td align='left'><span class='doc-prop'>Stationary</spa | |
<tr ><td align='left'><span class='doc-prop'>Ended</span></t <tr ><td align='left'><span class='doc-prop'>Ended</span></t | |
<tr ><td align='left'><span class='doc-prop'>Canceled</span> <tr ><td align='left'><span class='doc-prop'>Canceled</span> | |
</table> </table> | |
<p class='vspace'>Following is an example script which will s <p class='vspace'>Following is an example script which will s | |
</p><pre class='codelisting'> </p><pre class='codelisting'> | |
var particle : GameObject; var particle : GameObject; | |
function Update () { function Update () { | |
for (var touch : Touch in Input.touches) { for (var touch : Touch in Input.touches) { | |
if (touch.phase == TouchPhase.Began) { if (touch.phase == TouchPhase.Began) { | |
// Construct a ray from the current t // Construct a ray from the current t | |
var ray = Camera.main.ScreenPointToRa var ray = Camera.main.ScreenPointToRa | |
if (Physics.Raycast (ray)) { if (Physics.Raycast (ray)) { | |
// Create a particle if hit // Create a particle if hit | |
Instantiate (particle, transf Instantiate (particle, transf | |
} } | |
} } | |
} } | |
} } | |
</pre> </pre> | |
<div class='vspace'></div><h3>Mouse Simulation</h3> <div class='vspace'></div><h3>Mouse Simulation</h3> | |
<p>On top of native touch support Unity iOS/Android provides <p>On top of native touch support Unity iOS/Android provides | |
</p> </p> | |
<div class='vspace'></div><h2>Device Orientation</h2> <div class='vspace'></div><h2>Device Orientation</h2> | |
<p>Unity iOS/Android allows you to get discrete description o <p>Unity iOS/Android allows you to get discrete description o | |
</p> </p> | |
<p class='vspace'>You can retrieve device orientation by acce <p class='vspace'>You can retrieve device orientation by acce | |
</p><table ><tr ><td align='left'><span class='doc-prop'>Unk </p><table ><tr ><td align='left'><span class='doc-prop'>Unk | |
<tr ><td align='left'><span class='doc-prop'>Portrait</span> <tr ><td align='left'><span class='doc-prop'>Portrait</span> | |
<tr ><td align='left'><span class='doc-prop'>PortraitUpsideD <tr ><td align='left'><span class='doc-prop'>PortraitUpsideD | |
<tr ><td align='left'><span class='doc-prop'>LandscapeLeft</ <tr ><td align='left'><span class='doc-prop'>LandscapeLeft</ | |
<tr ><td align='left'><span class='doc-prop'>LandscapeRight< <tr ><td align='left'><span class='doc-prop'>LandscapeRight< | |
<tr ><td align='left'><span class='doc-prop'>FaceUp</span></ <tr ><td align='left'><span class='doc-prop'>FaceUp</span></ | |
<tr ><td align='left'><span class='doc-prop'>FaceDown</span> <tr ><td align='left'><span class='doc-prop'>FaceDown</span> | |
</table> </table> | |
<div class='vspace'></div><h2>Accelerometer</h2> <div class='vspace'></div><h2>Accelerometer</h2> | |
<p>As the mobile device moves, a built-in accelerometer repor <p>As the mobile device moves, a built-in accelerometer repor | |
changes along the three primary axes in three-dimensional spa changes along the three primary axes in three-dimensional spa | |
along each axis is reported directly by the hardware as G-for along each axis is reported directly by the hardware as G-for | |
of 1.0 represents a load of about +1g along a given axis whil of 1.0 represents a load of about +1g along a given axis whil | |
represents -1g. If you hold the device upright (with the home represents -1g. If you hold the device upright (with the home | |
bottom) in front of you, the X axis is positive along the rig bottom) in front of you, the X axis is positive along the rig | |
positive directly up, and the Z axis is positive pointing tow positive directly up, and the Z axis is positive pointing tow | |
</p> </p> | |
<p class='vspace'>You can retrieve the accelerometer value by <p class='vspace'>You can retrieve the accelerometer value by | |
</p> </p> | |
<p class='vspace'>The following is an example script which wi <p class='vspace'>The following is an example script which wi | |
</p><pre class='codelisting'> </p><pre class='codelisting'> | |
var speed = 10.0; var speed = 10.0; | |
function Update () { function Update () { | |
var dir : Vector3 = Vector3.zero; var dir : Vector3 = Vector3.zero; | |
// we assume that the device is held parallel to the // we assume that the device is held parallel to the | |
// and the Home button is in the right hand // and the Home button is in the right hand | |
// remap the device acceleration axis to game coordin // remap the device acceleration axis to game coordin | |
// 1) XY plane of the device is mapped onto XZ plane // 1) XY plane of the device is mapped onto XZ plane | |
// 2) rotated 90 degrees around Y axis // 2) rotated 90 degrees around Y axis | |
dir.x = -Input.acceleration.y; dir.x = -Input.acceleration.y; | |
dir.z = Input.acceleration.x; dir.z = Input.acceleration.x; | |
// clamp acceleration vector to the unit sphere // clamp acceleration vector to the unit sphere | |
if (dir.sqrMagnitude > 1) if (dir.sqrMagnitude > 1) | |
dir.Normalize(); dir.Normalize(); | |
// Make it move 10 meters per second instead of 10 me // Make it move 10 meters per second instead of 10 me | |
dir *= Time.deltaTime; dir *= Time.deltaTime; | |
// Move object // Move object | |
transform.Translate (dir * speed); transform.Translate (dir * speed); | |
} } | |
</pre> </pre> | |
<div class='vspace'></div><h3>Low-Pass Filter</h3> <div class='vspace'></div><h3>Low-Pass Filter</h3> | |
<p>Accelerometer readings can be jerky and noisy. Applying lo <p>Accelerometer readings can be jerky and noisy. Applying lo | |
</p> </p> | |
<p class='vspace'>The following script shows you how to apply <p class='vspace'>The following script shows you how to apply | |
</p><pre class='codelisting'> </p><pre class='codelisting'> | |
var AccelerometerUpdateInterval : float = 1.0 / 60.0; var AccelerometerUpdateInterval : float = 1.0 / 60.0; | |
var LowPassKernelWidthInSeconds : float = 1.0; var LowPassKernelWidthInSeconds : float = 1.0; | |
private var LowPassFilterFactor : float = AccelerometerUpdate private var LowPassFilterFactor : float = AccelerometerUpdate | |
private var lowPassValue : Vector3 = Vector3.zero; private var lowPassValue : Vector3 = Vector3.zero; | |
function Start () { function Start () { | |
lowPassValue = Input.acceleration; lowPassValue = Input.acceleration; | |
} } | |
function LowPassFilterAccelerometer() : Vector3 { function LowPassFilterAccelerometer() : Vector3 { | |
lowPassValue = Mathf.Lerp(lowPassValue, Input.acceler lowPassValue = Mathf.Lerp(lowPassValue, Input.acceler | |
return lowPassValue; return lowPassValue; | |
} } | |
</pre> </pre> | |
<p class='vspace'>The greater the value of <code>LowPassKerne <p class='vspace'>The greater the value of <code>LowPassKerne | |
</p> </p> | |
<div class='vspace'></div><h3>I'd like as much precision as p <div class='vspace'></div><h3>I'd like as much precision as p | |
<p>Reading the <a class='urllink' href='ScriptReference/Input <p>Reading the <a class='urllink' href='ScriptReference/Input | |
</p> </p> | |
<p class='vspace'>You can access all measurements executed by <p class='vspace'>You can access all measurements executed by | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'> <div class='vspace'></div><pre class='codelisting'> | |
var period : float = 0.0; var period : float = 0.0; | |
var acc : Vector3 = Vector3.zero; var acc : Vector3 = Vector3.zero; | |
for (var evnt : iPhoneAccelerationEvent in iPhoneInput.accel for (var evnt : iPhoneAccelerationEvent in iPhoneInput.accel | |
acc += evnt.acceleration * evnt.deltaTime; acc += evnt.acceleration * evnt.deltaTime; | |
period += evnt.deltaTime; period += evnt.deltaTime; | |
} } | |
if (period > 0) if (period > 0) | |
acc *= 1.0/period; acc *= 1.0/period; | |
return acc; return acc; | |
</pre> </pre> | |
<div class='vspace'></div><h2>Further Reading</h2> <div class='vspace'></div><h2>Further Reading</h2> | |
<p>The Unity mobile input API is originally based on Apple's <p>The Unity mobile input API is originally based on Apple's | |
You can find the Apple input API documentation here: You can find the Apple input API documentation here: | |
</p><ul><li><a class='urllink' href='file:///Library/Develope </p><ul><li><a class='urllink' href='file:///Library/Develope | |
</li><li><a class='urllink' href='file:///Library/Developer/S </li><li><a class='urllink' href='file:///Library/Developer/S | |
</li></ul><p class='vspace'><b>Note:</b> The above links refe </li></ul><p class='vspace'><b>Note:</b> The above links refe | |
</p> </p> | |
<div class='vspace'></div><a class='iosRef' id='iosRef' href= <div class='vspace'></div><a class='iosRef' id='iosRef' href= | |
<p><a name='iPhoneInput' id='iPhoneInput'></a> <p><a name='iPhoneInput' id='iPhoneInput'></a> | |
</p><div class='specific-ios' style='display: block;' id='spe </p><div class='specific-ios' style='display: block;' id='spe | |
<div class='vspace'></div><h2>Device geographical location</h <div class='vspace'></div><h2>Device geographical location</h | |
<p>Device geographical location can be obtained via the <a cl <p>Device geographical location can be obtained via the <a cl | |
</p></div> </p></div> | |
</p><small>Page last updated: 2012-06-28</p> | </p><small>Page last updated: 2012-06-28</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Transforms'></a><h1>Transforms</h1> <hr><a name='Transforms'></a><h1>Transforms</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p><span class='doc-keyword'>Transforms</span> are a key <spa <p><span class='doc-keyword'>Transforms</span> are a key <spa | |
</p> </p> | |
<p class='vspace'>The remainder of this page's text is from t <p class='vspace'>The remainder of this page's text is from t | |
</p> </p> | |
<div class='vspace'></div><h1>Transform</h1> <div class='vspace'></div><h1>Transform</h1> | |
<p>The <span class='doc-keyword'>Transform</span> <span class <p>The <span class='doc-keyword'>Transform</span> <span class | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Position</span> <tr ><td align='left'><span class='doc-prop'>Position</span> | |
<tr ><td align='left'><span class='doc-prop'>Rotation</span> <tr ><td align='left'><span class='doc-prop'>Rotation</span> | |
<tr ><td align='left'><span class='doc-prop'>Scale</span></t <tr ><td align='left'><span class='doc-prop'>Scale</span></t | |
</table> </table> | |
<p class='vspace'>All properties of a Transform are measured <p class='vspace'>All properties of a Transform are measured | |
</p> </p> | |
<div class='vspace'></div><h2>Using Transforms</h2> <div class='vspace'></div><h2>Using Transforms</h2> | |
<p>Transforms are always manipulated in 3D space in the X, Y, <p>Transforms are always manipulated in 3D space in the X, Y, | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Transforms can be directly manipulated in t <p class='vspace'>Transforms can be directly manipulated in t | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>The tools can be used on any object in the <p class='vspace'>The tools can be used on any object in the | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>When you click and drag on one of the three <p class='vspace'>When you click and drag on one of the three | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Around the centre of the Transform gizmo ar <p class='vspace'>Around the centre of the Transform gizmo ar | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'><a name='Parenting' id='Parenting'></a> <p class='vspace'><a name='Parenting' id='Parenting'></a> | |
</p><h2>Parenting</h2> </p><h2>Parenting</h2> | |
<p>Parenting is one of the most important concepts to underst <p>Parenting is one of the most important concepts to underst | |
</p> </p> | |
<p class='vspace'>You can create a Parent by dragging any Gam <p class='vspace'>You can create a Parent by dragging any Gam | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>In the above example, we say that the arms <p class='vspace'>In the above example, we say that the arms | |
</p> </p> | |
<p class='vspace'>It is worth pointing out that the Transform <p class='vspace'>It is worth pointing out that the Transform | |
</p> </p> | |
<p class='vspace'>You can build compound objects by parenting <p class='vspace'>You can build compound objects by parenting | |
</p> </p> | |
<div class='vspace'></div><h2>Performance Issues and Limitati <div class='vspace'></div><h2>Performance Issues and Limitati | |
<p>Non-uniform scaling is when the <span class='doc-prop'>Sca <p>Non-uniform scaling is when the <span class='doc-prop'>Sca | |
</p> </p> | |
<p class='vspace'>Non-uniform scaling has a negative impact o <p class='vspace'>Non-uniform scaling has a negative impact o | |
</p> </p> | |
<p class='vspace'>There are also certain limitations in how U <p class='vspace'>There are also certain limitations in how U | |
</p> </p> | |
<div class='vspace'></div><ul><li>Certain components do not f <div class='vspace'></div><ul><li>Certain components do not f | |
<div class='vspace'></div></li><li>A child object that has a <div class='vspace'></div></li><li>A child object that has a | |
<div class='vspace'></div></li><li>For performance reasons, a <div class='vspace'></div></li><li>For performance reasons, a | |
</li></ul><div class='vspace'></div><h2>Importance of Scale</ </li></ul><div class='vspace'></div><h2>Importance of Scale</ | |
<p>The scale of the Transform determines the difference betwe <p>The scale of the Transform determines the difference betwe | |
</p><ul><li>The size of your mesh in your 3D modeling applica </p><ul><li>The size of your mesh in your 3D modeling applica | |
</li><li>The <span class='doc-prop'>Mesh Scale Factor</span> </li><li>The <span class='doc-prop'>Mesh Scale Factor</span> | |
</li><li>The <span class='doc-prop'>Scale</span> values of yo </li><li>The <span class='doc-prop'>Scale</span> values of yo | |
</li></ul><p class='vspace'>Ideally, you should not adjust th </li></ul><p class='vspace'>Ideally, you should not adjust th | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>When parenting Transforms, set the parent's location <ul><li>When parenting Transforms, set the parent's location | |
</li><li><span class='doc-keyword'>Particle Systems</span> ar </li><li><span class='doc-keyword'>Particle Systems</span> ar | |
</li><li>If you are using <span class='doc-keyword'>Rigidbodi </li><li>If you are using <span class='doc-keyword'>Rigidbodi | |
</li><li>You can change the colors of the Transform axes (and </li><li>You can change the colors of the Transform axes (and | |
</li><li>It is best to avoid scaling within Unity if possible </li><li>It is best to avoid scaling within Unity if possible | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2007-11-16</p> | </p><small>Page last updated: 2007-11-16</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Physics'></a><h1>Physics</h1> <hr><a name='Physics'></a><h1>Physics</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity has NVIDIA PhysX physics engine built-in. This allow <p>Unity has NVIDIA PhysX physics engine built-in. This allow | |
</p> </p> | |
<div class='vspace'></div><h2>Basics</h2> <div class='vspace'></div><h2>Basics</h2> | |
<p>To put an object under physics control, simply add a <span <p>To put an object under physics control, simply add a <span | |
</p> </p> | |
<div class='vspace'></div><h3>Rigidbodies</h3> <div class='vspace'></div><h3>Rigidbodies</h3> | |
<p><a href="Components/class-Rigidbody.html">Rigidbodies</a> <p><a href="Components/class-Rigidbody.html">Rigidbodies</a> | |
</p> </p> | |
<p class='vspace'>If you move the Transform of a non-Kinemati <p class='vspace'>If you move the Transform of a non-Kinemati | |
</p> </p> | |
<p class='vspace'>You also use Rigidbodies to bring vehicles <p class='vspace'>You also use Rigidbodies to bring vehicles | |
</p> </p> | |
<p class='vspace'>You can make airplanes by applying forces t <p class='vspace'>You can make airplanes by applying forces t | |
</p> </p> | |
<p class='vspace'>Rigidbodies are most often used in combinat <p class='vspace'>Rigidbodies are most often used in combinat | |
</p> </p> | |
<p class='vspace'><b>Tips:</b> <p class='vspace'><b>Tips:</b> | |
</p><ul><li>You should never have a parent and child rigidbod </p><ul><li>You should never have a parent and child rigidbod | |
</li><li>You should never scale the parent of a rigidbody </li><li>You should never scale the parent of a rigidbody | |
</li></ul><div class='vspace'></div><h3>Kinematic Rigidbodies </li></ul><div class='vspace'></div><h3>Kinematic Rigidbodies | |
<p>A <span class='doc-keyword'>Kinematic Rigidbody</span> is <p>A <span class='doc-keyword'>Kinematic Rigidbody</span> is | |
</p> </p> | |
<p class='vspace'>Kinematic Rigidbodies correctly <a href="Co <p class='vspace'>Kinematic Rigidbodies correctly <a href="Co | |
</p> </p> | |
<p class='vspace'>These are a few example uses for Kinematic <p class='vspace'>These are a few example uses for Kinematic | |
</p> </p> | |
<div class='vspace'></div><ol><li>Sometimes you want an objec <div class='vspace'></div><ol><li>Sometimes you want an objec | |
</li><li>Sometimes you want a moving object that can push oth </li><li>Sometimes you want a moving object that can push oth | |
</li><li>You might want to have a Kinematic Rigidbody that is </li><li>You might want to have a Kinematic Rigidbody that is | |
</li></ol><div class='vspace'></div><h3>Static Colliders</h3> </li></ol><div class='vspace'></div><h3>Static Colliders</h3> | |
<p>A <span class='doc-keyword'>Static Collider</span> is a Ga <p>A <span class='doc-keyword'>Static Collider</span> is a Ga | |
</p> </p> | |
<p class='vspace'>You should never move a Static Collider on <p class='vspace'>You should never move a Static Collider on | |
</p> </p> | |
<div class='vspace'></div><h3>Character Controllers</h3> <div class='vspace'></div><h3>Character Controllers</h3> | |
<p>You use <a href="Components/class-CharacterController.html <p>You use <a href="Components/class-CharacterController.html | |
</p> </p> | |
<p class='vspace'>These Controllers don't follow the rules of <p class='vspace'>These Controllers don't follow the rules of | |
</p> </p> | |
<p class='vspace'>Character Controllers are not affected by f <p class='vspace'>Character Controllers are not affected by f | |
</p> </p> | |
<p class='vspace'>Character Controllers are inherently unphys <p class='vspace'>Character Controllers are inherently unphys | |
</p> </p> | |
<p class='vspace'>If you parent a Character Controller with a <p class='vspace'>If you parent a Character Controller with a | |
</p> </p> | |
<div class='vspace'></div><h1>Rigidbody</h1> <div class='vspace'></div><h1>Rigidbody</h1> | |
<p><span class='doc-keyword'>Rigidbodies</span> enable your < <p><span class='doc-keyword'>Rigidbodies</span> enable your < | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Mass</span></td <tr ><td align='left'><span class='doc-prop'>Mass</span></td | |
<tr ><td align='left'><span class='doc-prop'>Drag</span></td <tr ><td align='left'><span class='doc-prop'>Drag</span></td | |
<tr ><td align='left'><span class='doc-prop'>Angular Drag</s <tr ><td align='left'><span class='doc-prop'>Angular Drag</s | |
<tr ><td align='left'><span class='doc-prop'>Use Gravity</sp <tr ><td align='left'><span class='doc-prop'>Use Gravity</sp | |
<tr ><td align='left'><span class='doc-prop'>Is Kinematic</s <tr ><td align='left'><span class='doc-prop'>Is Kinematic</s | |
<tr ><td align='left'><span class='doc-prop'>Interpolate</sp <tr ><td align='left'><span class='doc-prop'>Interpolate</sp | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Freeze Rotation <tr ><td align='left'><span class='doc-prop'>Freeze Rotation | |
<tr ><td align='left'><span class='doc-prop'>Collision Detec <tr ><td align='left'><span class='doc-prop'>Collision Detec | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Constraints</sp <tr ><td align='left'><span class='doc-prop'>Constraints</sp | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
</table> </table> | |
<div class='vspace'></div><h2>Details</h2> <div class='vspace'></div><h2>Details</h2> | |
<p>Rigidbodies allow your GameObjects to act under control of <p>Rigidbodies allow your GameObjects to act under control of | |
</p> </p> | |
<p class='vspace'>The biggest difference between manipulating <p class='vspace'>The biggest difference between manipulating | |
</p> </p> | |
<p class='vspace'>Rigidbodies must be explicitly added to you <p class='vspace'>Rigidbodies must be explicitly added to you | |
</p> </p> | |
<div class='vspace'></div><h3>Parenting</h3> <div class='vspace'></div><h3>Parenting</h3> | |
<p>When an object is under physics control, it moves semi-ind <p>When an object is under physics control, it moves semi-ind | |
</p> </p> | |
<div class='vspace'></div><h3>Scripting</h3> <div class='vspace'></div><h3>Scripting</h3> | |
<p>To control your Rigidbodies, you will primarily use script <p>To control your Rigidbodies, you will primarily use script | |
</p> </p> | |
<div class='vspace'></div><h3>Animation</h3> <div class='vspace'></div><h3>Animation</h3> | |
<p>For some situations, mainly creating ragdoll effects, it i <p>For some situations, mainly creating ragdoll effects, it i | |
</p> </p> | |
<div class='vspace'></div><h3>Colliders</h3> <div class='vspace'></div><h3>Colliders</h3> | |
<p>Colliders are another kind of component that must be added <p>Colliders are another kind of component that must be added | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Add a Collider with the <span class='doc-pr <p class='vspace'>Add a Collider with the <span class='doc-pr | |
</p><ul><li><a href="Components/class-BoxCollider.html">Box C </p><ul><li><a href="Components/class-BoxCollider.html">Box C | |
</li><li><a href="Components/class-SphereCollider.html">Spher </li><li><a href="Components/class-SphereCollider.html">Spher | |
</li><li><a href="Components/class-CapsuleCollider.html">Caps </li><li><a href="Components/class-CapsuleCollider.html">Caps | |
</li><li><a href="Components/class-MeshCollider.html">Mesh Co </li><li><a href="Components/class-MeshCollider.html">Mesh Co | |
</li><li><a href="Components/class-WheelCollider.html">Wheel </li><li><a href="Components/class-WheelCollider.html">Wheel | |
</li></ul><div class='vspace'></div><h3>Compound Colliders</h </li></ul><div class='vspace'></div><h3>Compound Colliders</h | |
<p>Compound Colliders are combinations of primitive Colliders <p>Compound Colliders are combinations of primitive Colliders | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>In the above picture, the <em>Gun Model</em <p class='vspace'>In the above picture, the <em>Gun Model</em | |
</p> </p> | |
<p class='vspace'>Mesh Colliders can't normally collide with <p class='vspace'>Mesh Colliders can't normally collide with | |
</p> </p> | |
<div class='vspace'></div><h3>Continuous Collision Detection< <div class='vspace'></div><h3>Continuous Collision Detection< | |
<p>Continuous collision detection is a feature to prevent fas <p>Continuous collision detection is a feature to prevent fas | |
Continuous collision detection is supported for Box-, Sphere- Continuous collision detection is supported for Box-, Sphere- | |
</p> </p> | |
<div class='vspace'></div><h2>Use the right size</h2> <div class='vspace'></div><h2>Use the right size</h2> | |
<p>The size of the your GameObject's mesh is much more import <p>The size of the your GameObject's mesh is much more import | |
</p> </p> | |
<p class='vspace'>If you are modeling a human make sure he is <p class='vspace'>If you are modeling a human make sure he is | |
</p> </p> | |
<p class='vspace'>If you aren't able to adjust the mesh itsel <p class='vspace'>If you aren't able to adjust the mesh itsel | |
</p> </p> | |
<p class='vspace'>If your game requires that your GameObject <p class='vspace'>If your game requires that your GameObject | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>The relative <span class='doc-prop'>Mass</span> of tw <ul><li>The relative <span class='doc-prop'>Mass</span> of tw | |
</li><li>Making one Rigidbody have greater <span class='doc-p </li><li>Making one Rigidbody have greater <span class='doc-p | |
</li><li>A low <span class='doc-prop'>Drag</span> value makes </li><li>A low <span class='doc-prop'>Drag</span> value makes | |
</li><li>If you are directly manipulating the Transform compo </li><li>If you are directly manipulating the Transform compo | |
</li><li>If you are moving a GameObject through its Transform </li><li>If you are moving a GameObject through its Transform | |
</li></ul><h1>Constant Force</h1> </li></ul><h1>Constant Force</h1> | |
<p><span class='doc-keyword'>Constant Force</span> is a quick <p><span class='doc-keyword'>Constant Force</span> is a quick | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Force</span></t <tr ><td align='left'><span class='doc-prop'>Force</span></t | |
<tr ><td align='left'><span class='doc-prop'>Relative Force< <tr ><td align='left'><span class='doc-prop'>Relative Force< | |
<tr ><td align='left'><span class='doc-prop'>Torque</span></ <tr ><td align='left'><span class='doc-prop'>Torque</span></ | |
<tr ><td align='left'><span class='doc-prop'>Relative Torque <tr ><td align='left'><span class='doc-prop'>Relative Torque | |
</table> </table> | |
<div class='vspace'></div><h3>Details</h3> <div class='vspace'></div><h3>Details</h3> | |
<p>To make a rocket that accelerates forward set the <span cl <p>To make a rocket that accelerates forward set the <span cl | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>To make an object flow upwards, add a Constant Force <ul><li>To make an object flow upwards, add a Constant Force | |
</li><li>To make an object fly forwards, add a Constant Force </li><li>To make an object fly forwards, add a Constant Force | |
</li></ul><h1>Sphere Collider</h1> </li></ul><h1>Sphere Collider</h1> | |
<p>The <span class='doc-keyword'>Sphere Collider</span> is a <p>The <span class='doc-keyword'>Sphere Collider</span> is a | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Material</span> <tr ><td align='left'><span class='doc-prop'>Material</span> | |
<tr ><td align='left'><span class='doc-prop'>Is Trigger</spa <tr ><td align='left'><span class='doc-prop'>Is Trigger</spa | |
<tr ><td align='left'><span class='doc-prop'>Radius</span></ <tr ><td align='left'><span class='doc-prop'>Radius</span></ | |
<tr ><td align='left'><span class='doc-prop'>Center</span></ <tr ><td align='left'><span class='doc-prop'>Center</span></ | |
</table> </table> | |
<div class='vspace'></div><h2>Details</h2> <div class='vspace'></div><h2>Details</h2> | |
<p>The Sphere Collider can be resized to uniform scale, but n <p>The Sphere Collider can be resized to uniform scale, but n | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>A standard Sphere Collider</em> <p><em>A standard Sphere Collider</em> | |
</p> </p> | |
<p class='vspace'>Colliders work with Rigidbodies to bring ph <p class='vspace'>Colliders work with Rigidbodies to bring ph | |
</p> </p> | |
<p class='vspace'>When a collision between two Colliders occu <p class='vspace'>When a collision between two Colliders occu | |
</p> </p> | |
<div class='vspace'></div><h3>Triggers</h3> <div class='vspace'></div><h3>Triggers</h3> | |
<p>An alternative way of using Colliders is to mark them as a <p>An alternative way of using Colliders is to mark them as a | |
</p> </p> | |
<p class='vspace'>Be aware that in order for two Triggers to <p class='vspace'>Be aware that in order for two Triggers to | |
</p> </p> | |
<div class='vspace'></div><h3>Friction and bouncyness</h3> <div class='vspace'></div><h3>Friction and bouncyness</h3> | |
<p>Friction, bouncyness and softness are defined in the <a hr <p>Friction, bouncyness and softness are defined in the <a hr | |
</p> </p> | |
<div class='vspace'></div><h2>Compound Colliders</h2> <div class='vspace'></div><h2>Compound Colliders</h2> | |
<p>Compound Colliders are combinations of primitive Colliders <p>Compound Colliders are combinations of primitive Colliders | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>In the above picture, the <em>Gun Model</em <p class='vspace'>In the above picture, the <em>Gun Model</em | |
</p> </p> | |
<p class='vspace'>Mesh Colliders can't normally collide with <p class='vspace'>Mesh Colliders can't normally collide with | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>To add multiple Colliders for an object, create child <ul><li>To add multiple Colliders for an object, create child | |
</li><li>You can look at the gizmos in the <span class='doc-k </li><li>You can look at the gizmos in the <span class='doc-k | |
</li><li>Colliders do their best to match the scale of an obj </li><li>Colliders do their best to match the scale of an obj | |
</li><li>If you are moving an object through its Transform co </li><li>If you are moving an object through its Transform co | |
</li><li>If you make an explosion, it can be very effective t </li><li>If you make an explosion, it can be very effective t | |
</li></ul><div class='vspace'></div><h2>Advanced</h2> </li></ul><div class='vspace'></div><h2>Advanced</h2> | |
<div class='vspace'></div><h3>Collider combinations</h3> <div class='vspace'></div><h3>Collider combinations</h3> | |
<p>There are numerous different combinations of collisions th <p>There are numerous different combinations of collisions th | |
</p> </p> | |
<div class='vspace'></div><h4>Static Collider</h4> <div class='vspace'></div><h4>Static Collider</h4> | |
<p>These are GameObjects that do <b>not</b> have a Rigidbody <p>These are GameObjects that do <b>not</b> have a Rigidbody | |
</p> </p> | |
<div class='vspace'></div><h4>Rigidbody Collider</h4> <div class='vspace'></div><h4>Rigidbody Collider</h4> | |
<p>These GameObjects contain both a Rigidbody and a Collider. <p>These GameObjects contain both a Rigidbody and a Collider. | |
</p> </p> | |
<div class='vspace'></div><h4>Kinematic Rigidbody Collider</h <div class='vspace'></div><h4>Kinematic Rigidbody Collider</h | |
<p>This GameObject contains a Collider and a Rigidbody which <p>This GameObject contains a Collider and a Rigidbody which | |
</p> </p> | |
<p class='vspace'>This object can be used for circumstances i <p class='vspace'>This object can be used for circumstances i | |
</p> </p> | |
<p class='vspace'>Kinematic Rigidbodies can easily be turned <p class='vspace'>Kinematic Rigidbodies can easily be turned | |
</p> </p> | |
<p class='vspace'>If you have Rigidbodies come to rest so the <p class='vspace'>If you have Rigidbodies come to rest so the | |
</p> </p> | |
<div class='vspace'></div><h3>Collision action matrix</h3> <div class='vspace'></div><h3>Collision action matrix</h3> | |
<p>Depending on the configurations of the two colliding Objec <p>Depending on the configurations of the two colliding Objec | |
</p> </p> | |
<div class='vspace'></div> <div class='vspace'></div> | |
<table border='2' ><tr ><td align='center' colspan='7'><b>Co <table border='2' ><tr ><td align='center' colspan='7'><b>Co | |
<tr ><td > </td><td align='left'>Static Collider</td><t <tr ><td > </td><td align='left'>Static Collider</td><t | |
<tr ><td align='left'>Static Collider</td><td > </td><t <tr ><td align='left'>Static Collider</td><td > </td><t | |
<tr ><td align='left'>Rigidbody Collider</td><td align='cen <tr ><td align='left'>Rigidbody Collider</td><td align='cen | |
<tr ><td align='left'>Kinematic Rigidbody Collider</td><td > <tr ><td align='left'>Kinematic Rigidbody Collider</td><td > | |
<tr ><td align='left'>Static Trigger Collider</td><td >  <tr ><td align='left'>Static Trigger Collider</td><td >  | |
<tr ><td align='left'>Rigidbody Trigger Collider</td><td >&n <tr ><td align='left'>Rigidbody Trigger Collider</td><td >&n | |
<tr ><td align='left'>Kinematic Rigidbody Trigger Collider</ <tr ><td align='left'>Kinematic Rigidbody Trigger Collider</ | |
</table> </table> | |
<div class='vspace'></div> <div class='vspace'></div> | |
<table border='2' ><tr ><td align='center' colspan='7'><b>Tr <table border='2' ><tr ><td align='center' colspan='7'><b>Tr | |
<tr ><td > </td><td align='left'>Static Collider</td><t <tr ><td > </td><td align='left'>Static Collider</td><t | |
<tr ><td align='left'>Static Collider</td><td > </td><t <tr ><td align='left'>Static Collider</td><td > </td><t | |
<tr ><td align='left'>Rigidbody Collider</td><td > </td <tr ><td align='left'>Rigidbody Collider</td><td > </td | |
<tr ><td align='left'>Kinematic Rigidbody Collider</td><td > <tr ><td align='left'>Kinematic Rigidbody Collider</td><td > | |
<tr ><td align='left'>Static Trigger Collider</td><td >  <tr ><td align='left'>Static Trigger Collider</td><td >  | |
<tr ><td align='left'>Rigidbody Trigger Collider</td><td al <tr ><td align='left'>Rigidbody Trigger Collider</td><td al | |
<tr ><td align='left'>Kinematic Rigidbody Trigger Collider</ <tr ><td align='left'>Kinematic Rigidbody Trigger Collider</ | |
</table> </table> | |
<div class='vspace'></div><h3><a href="Components/LayerBasedC <div class='vspace'></div><h3><a href="Components/LayerBasedC | |
<p>In Unity 3.x we introduce something called <span class='do <p>In Unity 3.x we introduce something called <span class='do | |
</p><h1>Box Collider</h1> </p><h1>Box Collider</h1> | |
<p>The <span class='doc-keyword'>Box Collider</span> is a bas <p>The <span class='doc-keyword'>Box Collider</span> is a bas | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table border='2' ><tr class='tableheader'><td class='prop'> <table border='2' ><tr class='tableheader'><td class='prop'> | |
<tr ><td align='left'><span class='doc-prop'>Material</span> <tr ><td align='left'><span class='doc-prop'>Material</span> | |
<tr ><td align='left'><span class='doc-prop'>Is Trigger</spa <tr ><td align='left'><span class='doc-prop'>Is Trigger</spa | |
<tr ><td align='left'><span class='doc-prop'>Size</span></td <tr ><td align='left'><span class='doc-prop'>Size</span></td | |
<tr ><td align='left'><span class='doc-prop'>Center</span></ <tr ><td align='left'><span class='doc-prop'>Center</span></ | |
</table> </table> | |
<div class='vspace'></div><h2>Details</h2> <div class='vspace'></div><h2>Details</h2> | |
<p>The Box Collider can be resized into different shapes of r <p>The Box Collider can be resized into different shapes of r | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Colliders work with Rigidbodies to bring ph <p class='vspace'>Colliders work with Rigidbodies to bring ph | |
</p> </p> | |
<p class='vspace'>When a collision between two Colliders occu <p class='vspace'>When a collision between two Colliders occu | |
</p> </p> | |
<div class='vspace'></div><h3>Triggers</h3> <div class='vspace'></div><h3>Triggers</h3> | |
<p>An alternative way of using Colliders is to mark them as a <p>An alternative way of using Colliders is to mark them as a | |
</p> </p> | |
<p class='vspace'>Be aware that in order for two Triggers to <p class='vspace'>Be aware that in order for two Triggers to | |
</p> </p> | |
<div class='vspace'></div><h3>Friction and bouncyness</h3> <div class='vspace'></div><h3>Friction and bouncyness</h3> | |
<p>Friction, bouncyness and softness are defined in the <a hr <p>Friction, bouncyness and softness are defined in the <a hr | |
</p><h1>Mesh Collider</h1> </p><h1>Mesh Collider</h1> | |
<p>The <span class='doc-keyword'>Mesh Collider</span> takes a <p>The <span class='doc-keyword'>Mesh Collider</span> takes a | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table border='2' ><tr class='tableheader'><td class='prop'> <table border='2' ><tr class='tableheader'><td class='prop'> | |
<tr ><td align='left'><span class='doc-prop'>Material</span> <tr ><td align='left'><span class='doc-prop'>Material</span> | |
<tr ><td align='left'><span class='doc-prop'>Is Trigger</spa <tr ><td align='left'><span class='doc-prop'>Is Trigger</spa | |
<tr ><td align='left'><span class='doc-prop'>Mesh</span></td <tr ><td align='left'><span class='doc-prop'>Mesh</span></td | |
<tr ><td align='left'><span class='doc-prop'>Smooth Sphere C <tr ><td align='left'><span class='doc-prop'>Smooth Sphere C | |
<tr ><td align='left'><span class='doc-prop'>Convex</span></ <tr ><td align='left'><span class='doc-prop'>Convex</span></ | |
</table> </table> | |
<div class='vspace'></div><h2>Details</h2> <div class='vspace'></div><h2>Details</h2> | |
<p>The Mesh Collider builds its collision representation from <p>The Mesh Collider builds its collision representation from | |
</p> </p> | |
<p class='vspace'>Collision meshes use backface culling. If a <p class='vspace'>Collision meshes use backface culling. If a | |
</p> </p> | |
<p class='vspace'>There are some limitations when using the M <p class='vspace'>There are some limitations when using the M | |
</p> </p> | |
<p class='vspace'>Colliders work with Rigidbodies to bring ph <p class='vspace'>Colliders work with Rigidbodies to bring ph | |
</p> </p> | |
<p class='vspace'>When a collision between two Colliders occu <p class='vspace'>When a collision between two Colliders occu | |
</p> </p> | |
<div class='vspace'></div><h3>Triggers</h3> <div class='vspace'></div><h3>Triggers</h3> | |
<p>An alternative way of using Colliders is to mark them as a <p>An alternative way of using Colliders is to mark them as a | |
</p> </p> | |
<p class='vspace'>Be aware that in order for two Triggers to <p class='vspace'>Be aware that in order for two Triggers to | |
</p> </p> | |
<div class='vspace'></div><h3>Friction and bouncyness</h3> <div class='vspace'></div><h3>Friction and bouncyness</h3> | |
<p>Friction, bouncyness and softness are defined in the <a hr <p>Friction, bouncyness and softness are defined in the <a hr | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>Mesh Colliders <b>cannot</b> collide with each other <ul><li>Mesh Colliders <b>cannot</b> collide with each other | |
</li><li><span class='doc-prop'>Convex</span> Mesh Colliders </li><li><span class='doc-prop'>Convex</span> Mesh Colliders | |
</li><li>Primitive Colliders are less costly for objects unde </li><li>Primitive Colliders are less costly for objects unde | |
</li><li>When you attach a Mesh Collider to a <span class='do </li><li>When you attach a Mesh Collider to a <span class='do | |
</li><li>To add multiple Colliders for an object, create chil </li><li>To add multiple Colliders for an object, create chil | |
</li><li>You can look at the gizmos in the <span class='doc-k </li><li>You can look at the gizmos in the <span class='doc-k | |
</li><li>Colliders do their best to match the scale of an obj </li><li>Colliders do their best to match the scale of an obj | |
</li><li>If you are moving an object through its Transform co </li><li>If you are moving an object through its Transform co | |
</li></ul><h1>Physic Material</h1> </li></ul><h1>Physic Material</h1> | |
<p>The <span class='doc-keyword'>Physic Material</span> is us <p>The <span class='doc-keyword'>Physic Material</span> is us | |
</p> </p> | |
<p class='vspace'>To create a Physic Material select <span cl <p class='vspace'>To create a Physic Material select <span cl | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table border='2' ><tr class='tableheader'><td class='prop'> <table border='2' ><tr class='tableheader'><td class='prop'> | |
<tr ><td align='left'><span class='doc-prop'>Dynamic Frictio <tr ><td align='left'><span class='doc-prop'>Dynamic Frictio | |
<tr ><td align='left'><span class='doc-prop'>Static Friction <tr ><td align='left'><span class='doc-prop'>Static Friction | |
<tr ><td align='left'><span class='doc-prop'>Bouncyness</spa <tr ><td align='left'><span class='doc-prop'>Bouncyness</spa | |
<tr ><td align='left'><span class='doc-prop'>Friction Combin <tr ><td align='left'><span class='doc-prop'>Friction Combin | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Bounce Combine< <tr ><td align='left'><span class='doc-prop'>Bounce Combine< | |
<tr ><td align='left'><span class='doc-prop'>Friction Direct <tr ><td align='left'><span class='doc-prop'>Friction Direct | |
<tr ><td align='left'><span class='doc-prop'>Dynamic Frictio <tr ><td align='left'><span class='doc-prop'>Dynamic Frictio | |
<tr ><td align='left'><span class='doc-prop'>Static Friction <tr ><td align='left'><span class='doc-prop'>Static Friction | |
</table> </table> | |
<div class='vspace'></div><h2>Details</h2> <div class='vspace'></div><h2>Details</h2> | |
<p>Friction is the quantity which prevents surfaces from slid <p>Friction is the quantity which prevents surfaces from slid | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>Don't try to use a standard physic material for the m <ul><li>Don't try to use a standard physic material for the m | |
</li></ul><h1>Hinge Joint</h1> </li></ul><h1>Hinge Joint</h1> | |
<p>The <span class='doc-keyword'>Hinge Joint</span> groups to <p>The <span class='doc-keyword'>Hinge Joint</span> groups to | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table border='2' ><tr class='tableheader'><td class='prop'> <table border='2' ><tr class='tableheader'><td class='prop'> | |
<tr ><td align='left'><span class='doc-prop'>Connected Body< <tr ><td align='left'><span class='doc-prop'>Connected Body< | |
<tr ><td align='left'><span class='doc-prop'>Anchor</span></ <tr ><td align='left'><span class='doc-prop'>Anchor</span></ | |
<tr ><td align='left'><span class='doc-prop'>Axis</span></td <tr ><td align='left'><span class='doc-prop'>Axis</span></td | |
<tr ><td align='left'><span class='doc-prop'>Use Spring</spa <tr ><td align='left'><span class='doc-prop'>Use Spring</spa | |
<tr ><td align='left'><span class='doc-prop'>Spring</span></ <tr ><td align='left'><span class='doc-prop'>Spring</span></ | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Use Motor</span <tr ><td align='left'><span class='doc-prop'>Use Motor</span | |
<tr ><td align='left'><span class='doc-prop'>Motor</span></t <tr ><td align='left'><span class='doc-prop'>Motor</span></t | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Use Limits</spa <tr ><td align='left'><span class='doc-prop'>Use Limits</spa | |
<tr ><td align='left'><span class='doc-prop'>Limits </span>< <tr ><td align='left'><span class='doc-prop'>Limits </span>< | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Break Force</sp <tr ><td align='left'><span class='doc-prop'>Break Force</sp | |
<tr ><td align='left'><span class='doc-prop'>Break Torque</s <tr ><td align='left'><span class='doc-prop'>Break Torque</s | |
</table> </table> | |
<div class='vspace'></div><h2>Details</h2> <div class='vspace'></div><h2>Details</h2> | |
<p>A single Hinge Joint should be applied to a <span class='d <p>A single Hinge Joint should be applied to a <span class='d | |
</p> </p> | |
<p class='vspace'>Think about how the hinge of a door works. <p class='vspace'>Think about how the hinge of a door works. | |
</p> </p> | |
<p class='vspace'>Now think about a doggy door hinge. The dog <p class='vspace'>Now think about a doggy door hinge. The dog | |
</p> </p> | |
<div class='vspace'></div><h3>Chains</h3> <div class='vspace'></div><h3>Chains</h3> | |
<p>Multiple Hinge Joints can also be strung together to creat <p>Multiple Hinge Joints can also be strung together to creat | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>You do not need to assign a <span class='doc-prop'>Co <ul><li>You do not need to assign a <span class='doc-prop'>Co | |
</li><li>Use <span class='doc-prop'>Break Force</span> in ord </li><li>Use <span class='doc-prop'>Break Force</span> in ord | |
</li><li>The <span class='doc-prop'>Spring</span>, <span clas </li><li>The <span class='doc-prop'>Spring</span>, <span clas | |
</li></ul><h1>Spring Joint</h1> </li></ul><h1>Spring Joint</h1> | |
<p>The <span class='doc-keyword'>Spring Joint</span> groups t <p>The <span class='doc-keyword'>Spring Joint</span> groups t | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table border='2' ><tr class='tableheader'><td class='prop'> <table border='2' ><tr class='tableheader'><td class='prop'> | |
<tr ><td align='left'><span class='doc-prop'>Connected Body< <tr ><td align='left'><span class='doc-prop'>Connected Body< | |
<tr ><td align='left'><span class='doc-prop'>Anchor</span></ <tr ><td align='left'><span class='doc-prop'>Anchor</span></ | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Spring</span></ <tr ><td align='left'><span class='doc-prop'>Spring</span></ | |
<tr ><td align='left'><span class='doc-prop'>Damper</span></ <tr ><td align='left'><span class='doc-prop'>Damper</span></ | |
<tr ><td align='left'><span class='doc-prop'>Min Distance</s <tr ><td align='left'><span class='doc-prop'>Min Distance</s | |
<tr ><td align='left'><span class='doc-prop'>Max Distance</s <tr ><td align='left'><span class='doc-prop'>Max Distance</s | |
<tr ><td align='left'><span class='doc-prop'>Break Force</sp <tr ><td align='left'><span class='doc-prop'>Break Force</sp | |
<tr ><td align='left'><span class='doc-prop'>Break Torque</s <tr ><td align='left'><span class='doc-prop'>Break Torque</s | |
</table> </table> | |
<div class='vspace'></div><h2>Details</h2> <div class='vspace'></div><h2>Details</h2> | |
<p>Spring Joints allows a Rigidbodied <span class='doc-keywor <p>Spring Joints allows a Rigidbodied <span class='doc-keywor | |
</p> </p> | |
<p class='vspace'>The "target" position of the Spring is dete <p class='vspace'>The "target" position of the Spring is dete | |
</p> </p> | |
<div class='vspace'></div><h3>Connected Rigidbody</h3> <div class='vspace'></div><h3>Connected Rigidbody</h3> | |
<p>You do not need to use a <span class='doc-prop'>Connected <p>You do not need to use a <span class='doc-prop'>Connected | |
</p> </p> | |
<div class='vspace'></div><h3>Spring & Damper</h3> <div class='vspace'></div><h3>Spring & Damper</h3> | |
<p><span class='doc-prop'>Spring</span> is the strength of th <p><span class='doc-prop'>Spring</span> is the strength of th | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Damper</span> is the <p class='vspace'><span class='doc-prop'>Damper</span> is the | |
</p> </p> | |
<div class='vspace'></div><h3>Min & Max Distance</h3> <div class='vspace'></div><h3>Min & Max Distance</h3> | |
<p>If the position of your object falls in-between the <span <p>If the position of your object falls in-between the <span | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>You do not need to assign a <span class='doc-prop'>Co <ul><li>You do not need to assign a <span class='doc-prop'>Co | |
</li><li>Set the ideal positions of your Jointed objects in t </li><li>Set the ideal positions of your Jointed objects in t | |
</li><li>Spring Joints require your object to have a Rigidbod </li><li>Spring Joints require your object to have a Rigidbod | |
</li></ul><div class='vspace'></div><a class='iosRef' id='ios </li></ul><div class='vspace'></div><a class='iosRef' id='ios | |
<div class='specific-ios' style='display: block;' id='specifi <div class='specific-ios' style='display: block;' id='specifi | |
<p>iOS physics optimization hints can be found <span style='f <p>iOS physics optimization hints can be found <span style='f | |
</p></div> </p></div> | |
</p><small>Page last updated: 2011-01-12</p> | </p><small>Page last updated: 2011-01-12</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='RandomNumbers'></a><h1>RandomNumbers</h1> <hr><a name='RandomNumbers'></a><h1>RandomNumbers</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Randomly chosen items or values are important in many game <p>Randomly chosen items or values are important in many game | |
</p> </p> | |
<div class='vspace'></div><h2>Choosing a Random Item from an <div class='vspace'></div><h2>Choosing a Random Item from an | |
<p>Picking an array element at random boils down to choosing <p>Picking an array element at random boils down to choosing | |
</p> </p> | |
<p class='vspace'><code class='escaped'>var element = myArray <p class='vspace'><code class='escaped'>var element = myArray | |
</p> </p> | |
<p class='vspace'>Note that Random.Range returns a value from <p class='vspace'>Note that Random.Range returns a value from | |
</p> </p> | |
<div class='vspace'></div><h2>Choosing Items with Different P <div class='vspace'></div><h2>Choosing Items with Different P | |
<p>Sometimes, you need to choose items at random but with som <p>Sometimes, you need to choose items at random but with som | |
</p> </p> | |
<div class='vspace'></div><ul><li>50% chance of friendly gree <div class='vspace'></div><ul><li>50% chance of friendly gree | |
</li><li>25% chance of running away </li><li>25% chance of running away | |
</li><li>20% chance of immediate attack </li><li>20% chance of immediate attack | |
</li><li>5% chance of offering money as a gift </li><li>5% chance of offering money as a gift | |
</li></ul><p class='vspace'>You can visualise these different </li></ul><p class='vspace'>You can visualise these different | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>In the script, the paper strip is actually <p class='vspace'>In the script, the paper strip is actually | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>function C <div class='vspace'></div><pre class='codelisting'>function C | |
var total = 0; var total = 0; | |
for (elem in probs) { for (elem in probs) { | |
total += elem; total += elem; | |
} } | |
var randomPoint = Random.value * total; var randomPoint = Random.value * total; | |
for (i = 0; i < probs.Length; i++) { for (i = 0; i < probs.Length; i++) { | |
if (randomPoint < probs[i]) if (randomPoint < probs[i]) | |
return i; return i; | |
else else | |
randomPoint -= probs[i]; randomPoint -= probs[i]; | |
} } | |
return probs.Length - 1; return probs.Length - 1; | |
}</pre> }</pre> | |
<p class='vspace'>Note that the final return statement is nec <p class='vspace'>Note that the final return statement is nec | |
</p> </p> | |
<p class='vspace'><code class='escaped'>if (randomPoint < <p class='vspace'><code class='escaped'>if (randomPoint < | |
</p> </p> | |
<p class='vspace'>...to a less-than-or-equal test would avoid <p class='vspace'>...to a less-than-or-equal test would avoid | |
</p> </p> | |
<div class='vspace'></div><h2>Shuffling a List</h2> <div class='vspace'></div><h2>Shuffling a List</h2> | |
<p>A common game mechanic is to choose from a known set of it <p>A common game mechanic is to choose from a known set of it | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>function S <div class='vspace'></div><pre class='codelisting'>function S | |
for (i = 0; i < deck.Length; i++) { for (i = 0; i < deck.Length; i++) { | |
var temp = deck[i]; var temp = deck[i]; | |
var randomIndex = Random.Range(0, deck.Length var randomIndex = Random.Range(0, deck.Length | |
deck[i] = deck[randomIndex]; deck[i] = deck[randomIndex]; | |
deck[randomIndex] = temp; deck[randomIndex] = temp; | |
} } | |
}</pre> }</pre> | |
<div class='vspace'></div><h2>Choosing from a Set of Items Wi <div class='vspace'></div><h2>Choosing from a Set of Items Wi | |
<p>A common task is to pick a number of items randomly from a <p>A common task is to pick a number of items randomly from a | |
</p> </p> | |
<p class='vspace'>As an example, suppose that ten spawn point <p class='vspace'>As an example, suppose that ten spawn point | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>var spawnP <div class='vspace'></div><pre class='codelisting'>var spawnP | |
function ChooseSet(numRequired: int) { function ChooseSet(numRequired: int) { | |
var result = new Transform[numRequired]; var result = new Transform[numRequired]; | |
var numToChoose = numRequired; var numToChoose = numRequired; | |
for (numLeft = spawnPoints.Length; numLeft > 0; nu for (numLeft = spawnPoints.Length; numLeft > 0; nu | |
// Adding 0.0 is simply to cast the integers // Adding 0.0 is simply to cast the integers | |
var prob = numToChoose + 0.0 / numLeft + 0.0; var prob = numToChoose + 0.0 / numLeft + 0.0; | |
if (Random.value <= prob) { if (Random.value <= prob) { | |
numToChoose--; numToChoose--; | |
result[numToChoose] = spawnPoints[num result[numToChoose] = spawnPoints[num | |
if (numToChoose == 0) if (numToChoose == 0) | |
break; break; | |
} } | |
} } | |
return result; return result; | |
}</pre> }</pre> | |
<p class='vspace'>Note that although the selection is random, <p class='vspace'>Note that although the selection is random, | |
</p> </p> | |
<div class='vspace'></div><h2>Random Points in Space</h2> <div class='vspace'></div><h2>Random Points in Space</h2> | |
<p>A random point in a cubic volume can be chosen by setting <p>A random point in a cubic volume can be chosen by setting | |
</p> </p> | |
<p class='vspace'><code class='escaped'>var randVec = Vector3 <p class='vspace'><code class='escaped'>var randVec = Vector3 | |
</p> </p> | |
<p class='vspace'>This gives a point inside a cube with sides <p class='vspace'>This gives a point inside a cube with sides | |
</p> </p> | |
<p class='vspace'>When the volume is a sphere (ie, when you w <p class='vspace'>When the volume is a sphere (ie, when you w | |
</p> </p> | |
<p class='vspace'><code class='escaped'>var randWithinRadius <p class='vspace'><code class='escaped'>var randWithinRadius | |
</p> </p> | |
<p class='vspace'>Note that if you set one of the resulting v <p class='vspace'>Note that if you set one of the resulting v | |
</p> </p> | |
<p class='vspace'><code class='escaped'>var randWithinCircle <p class='vspace'><code class='escaped'>var randWithinCircle | |
</p> </p> | |
<div class='vspace'></div> <div class='vspace'></div> | |
</p><small>Page last updated: 2011-09-12</p> | </p><small>Page last updated: 2011-09-12</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Particle Systems'></a><h1>Particle Systems</h1> <hr><a name='Particle Systems'></a><h1>Particle Systems</h1> | |
<div class='property-Note'>Note: This is the documentation fo | | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> <div class='property-Note'>Note: This is the documentatio | |
<div class='vspace'></div><h1>Particle System (Shuriken)</h1> <div class='vspace'></div><h1>Particle System (Shuriken)</h1> | |
<p>Particle Systems in Unity are used to make clouds of smoke <p>Particle Systems in Unity are used to make clouds of smoke | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>You can create a new particle system by cre <p class='vspace'>You can create a new particle system by cre | |
</p> </p> | |
<div class='vspace'></div><h2>The Particle System Inspector ( <div class='vspace'></div><h2>The Particle System Inspector ( | |
<p>The <span class='doc-menu'>Particle System Inspector</span <p>The <span class='doc-menu'>Particle System Inspector</span | |
</p><div><img class='figure' src='Images/manual/ParticleSyste </p><div><img class='figure' src='Images/manual/ParticleSyste | |
<p class='vspace'>Individual particle systems can take on var <p class='vspace'>Individual particle systems can take on var | |
</p> </p> | |
<p class='vspace'>They can also be extended by being grouped <p class='vspace'>They can also be extended by being grouped | |
</p> </p> | |
<p class='vspace'>If you press the button <span class='doc-me <p class='vspace'>If you press the button <span class='doc-me | |
</p> </p> | |
<div class='vspace'></div><h2>Scene View Editing</h2> <div class='vspace'></div><h2>Scene View Editing</h2> | |
<p>When creating and editing Particle Systems, you either wor <p>When creating and editing Particle Systems, you either wor | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Scrubbing play back time can be performed b <p class='vspace'>Scrubbing play back time can be performed b | |
</p> </p> | |
<div class='vspace'></div><h1>Particle System Curve Editor</h <div class='vspace'></div><h1>Particle System Curve Editor</h | |
<h2>MinMax curves</h2> <h2>MinMax curves</h2> | |
<p>Many of the properties in the particle system modules desc <p>Many of the properties in the particle system modules desc | |
These time-animated properties (for example <span class='doc These time-animated properties (for example <span class='doc | |
</p><div><img class='figure' src='Images/manual/ParticleSyste </p><div><img class='figure' src='Images/manual/ParticleSyste | |
<p class='vspace'><span class='doc-prop'>Constant</span>: The <p class='vspace'><span class='doc-prop'>Constant</span>: The | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Random between const <p class='vspace'><span class='doc-prop'>Random between const | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Curve</span>: The va <p class='vspace'><span class='doc-prop'>Curve</span>: The va | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='indent'>A property animated with a Curve <div class='indent'>A property animated with a Curve | |
</div><p class='vspace'><span class='doc-prop'>Random between </div><p class='vspace'><span class='doc-prop'>Random between | |
</p><div><img class='figure' src='Images/manual/ParticleSyste </p><div><img class='figure' src='Images/manual/ParticleSyste | |
<p>A property animated as <span class='doc-prop'>Random Betwe <p>A property animated as <span class='doc-prop'>Random Betwe | |
</p> </p> | |
<p class='vspace'>In the <span class='doc-keyword'>Curve Edit <p class='vspace'>In the <span class='doc-keyword'>Curve Edit | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='indent'>Multiple curves in the same curve editor <div class='indent'>Multiple curves in the same curve editor | |
</div><p class='vspace'>Note that the "-" in the bottom-right </div><p class='vspace'>Note that the "-" in the bottom-right | |
</p> </p> | |
<p class='vspace'>For animating properties that describe vect <p class='vspace'>For animating properties that describe vect | |
</p><div><img class='figure' src='Images/manual/ParticleSyste </p><div><img class='figure' src='Images/manual/ParticleSyste | |
<div class='vspace'></div><h2>Managing many curves in the cur <div class='vspace'></div><h2>Managing many curves in the cur | |
<p>To avoid cluttering in the <span class='doc-keyword'>Curve <p>To avoid cluttering in the <span class='doc-keyword'>Curve | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p>A detached Curve Editor that can be docked like any other <p>A detached Curve Editor that can be docked like any other | |
</p> </p> | |
<p class='vspace'>For more information on working with curves | <p class='vspace'>For more information on working with curves | |
</p><h1>Colors and Gradients in the Particle System (Shuriken </p><h1>Colors and Gradients in the Particle System (Shuriken | |
<div><img class='figure' src='Images/manual/ParticleSystems-9 <div><img class='figure' src='Images/manual/ParticleSystems-9 | |
<p>For properties that deal with color, the <span class='doc- <p>For properties that deal with color, the <span class='doc- | |
It works in a similar way to the <a href="Manual/ParticleSyst It works in a similar way to the <a href="Manual/ParticleSyst | |
</p> </p> | |
<p class='vspace'>The color-based properties will have a pull <p class='vspace'>The color-based properties will have a pull | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'><span class='doc-prop'>Color</span>: The co | <p class='vspace'><span class='doc-prop'>Color</span>: The co | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Gradient</span>: The <p class='vspace'><span class='doc-prop'>Gradient</span>: The | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Random Between Two C | <p class='vspace'><span class='doc-prop'>Random Between Two C | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Random Between Two G <p class='vspace'><span class='doc-prop'>Random Between Two G | |
</p> </p> | |
<div class='vspace'></div><ul><li class='toclink'><a href="Ma <div class='vspace'></div><ul><li class='toclink'><a href="Ma | |
</li><li class='toclink'><a href="Manual/ParticleSystemColorE </li><li class='toclink'><a href="Manual/ParticleSystemColorE | |
</li><li class='toclink'><a href="Manual/GradientEditor.html" </li><li class='toclink'><a href="Manual/GradientEditor.html" | |
</li><li class='toclink'><a href="Manual/ParticleSystemInspec </li><li class='toclink'><a href="Manual/ParticleSystemInspec | |
</li><li class='toclink'><a href="Manual/ParticleSystemModule </li><li class='toclink'><a href="Manual/ParticleSystemModule | |
</li></ul><div class='specific-u30' style='display: block;' i | </li></ul> | |
<ul><li class='toclink'><a href="Manual/ParticleSystemModules | <div class='specific-u40' style='display: block;' id='specifi | |
> <ul><li class='toclink'><a href="Manual/ParticleSystemModules | |
</li></ul></div> </li></ul></div> | |
< | |
<ul><li class='toclink'><a href="Manual/ParticleSystemGroupin <ul><li class='toclink'><a href="Manual/ParticleSystemGroupin | |
</li></ul><div class='specific-u30' style='display: block;' i | </li></ul> | |
</div> | </p><small>Page last updated: 2012-01-13</p><br/> | |
</p><small>Page last updated: 2012-01-13</p> < | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Particle System Curve Editor'></a><h1>Particle S <hr><a name='Particle System Curve Editor'></a><h1>Particle S | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<h2>MinMax curves</h2> <h2>MinMax curves</h2> | |
<p>Many of the properties in the particle system modules desc <p>Many of the properties in the particle system modules desc | |
These time-animated properties (for example <span class='doc These time-animated properties (for example <span class='doc | |
</p><div><img class='figure' src='Images/manual/ParticleSyste </p><div><img class='figure' src='Images/manual/ParticleSyste | |
<p class='vspace'><span class='doc-prop'>Constant</span>: The <p class='vspace'><span class='doc-prop'>Constant</span>: The | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Random between const <p class='vspace'><span class='doc-prop'>Random between const | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Curve</span>: The va <p class='vspace'><span class='doc-prop'>Curve</span>: The va | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='indent'>A property animated with a Curve <div class='indent'>A property animated with a Curve | |
</div><p class='vspace'><span class='doc-prop'>Random between </div><p class='vspace'><span class='doc-prop'>Random between | |
</p><div><img class='figure' src='Images/manual/ParticleSyste </p><div><img class='figure' src='Images/manual/ParticleSyste | |
<p>A property animated as <span class='doc-prop'>Random Betwe <p>A property animated as <span class='doc-prop'>Random Betwe | |
</p> </p> | |
<p class='vspace'>In the <span class='doc-keyword'>Curve Edit <p class='vspace'>In the <span class='doc-keyword'>Curve Edit | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='indent'>Multiple curves in the same curve editor <div class='indent'>Multiple curves in the same curve editor | |
</div><p class='vspace'>Note that the "-" in the bottom-right </div><p class='vspace'>Note that the "-" in the bottom-right | |
</p> </p> | |
<p class='vspace'>For animating properties that describe vect <p class='vspace'>For animating properties that describe vect | |
</p><div><img class='figure' src='Images/manual/ParticleSyste </p><div><img class='figure' src='Images/manual/ParticleSyste | |
<div class='vspace'></div><h2>Managing many curves in the cur <div class='vspace'></div><h2>Managing many curves in the cur | |
<p>To avoid cluttering in the <span class='doc-keyword'>Curve <p>To avoid cluttering in the <span class='doc-keyword'>Curve | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p>A detached Curve Editor that can be docked like any other <p>A detached Curve Editor that can be docked like any other | |
</p> </p> | |
<p class='vspace'>For more information on working with curves | <p class='vspace'>For more information on working with curves | |
</p> </p> | |
</p><small>Page last updated: 2012-01-16</p> | </p><small>Page last updated: 2012-01-16</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Particle System Color Editor'></a><h1>Particle S <hr><a name='Particle System Color Editor'></a><h1>Particle S | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<div><img class='figure' src='Images/manual/ParticleSystemCol <div><img class='figure' src='Images/manual/ParticleSystemCol | |
<p>For properties that deal with color, the <span class='doc- <p>For properties that deal with color, the <span class='doc- | |
It works in a similar way to the <a href="Manual/ParticleSyst It works in a similar way to the <a href="Manual/ParticleSyst | |
</p> </p> | |
<p class='vspace'>The color-based properties will have a pull <p class='vspace'>The color-based properties will have a pull | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'><span class='doc-prop'>Color</span>: The co | <p class='vspace'><span class='doc-prop'>Color</span>: The co | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Gradient</span>: The <p class='vspace'><span class='doc-prop'>Gradient</span>: The | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Random Between Two C | <p class='vspace'><span class='doc-prop'>Random Between Two C | |
</p> </p> | |
<p class='vspace'><span class='doc-prop'>Random Between Two G <p class='vspace'><span class='doc-prop'>Random Between Two G | |
</p> </p> | |
</p><small>Page last updated: 2012-01-13</p> | </p><small>Page last updated: 2012-01-13</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Particle System Gradient Editor'></a><h1>Particl <hr><a name='Particle System Gradient Editor'></a><h1>Particl | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<div><img class='figure' src='Images/manual/GradientEditor-0. <div><img class='figure' src='Images/manual/GradientEditor-0. | |
<div class='indent'>Gradient editor <div class='indent'>Gradient editor | |
</div><p class='vspace'>The <span class='doc-keyword'>Gradien </div><p class='vspace'>The <span class='doc-keyword'>Gradien | |
</p> </p> | |
<p class='vspace'>You can add new <em>markers</em> for Alpha <p class='vspace'>You can add new <em>markers</em> for Alpha | |
</p> </p> | |
<p class='vspace'>If an Alpha tick is selected, you can edit <p class='vspace'>If an Alpha tick is selected, you can edit | |
</p> </p> | |
<p class='vspace'>If a Color tick is selected, the color can <p class='vspace'>If a Color tick is selected, the color can | |
</p> </p> | |
<p class='vspace'>To remove a <em>marker</em>, just drag it o <p class='vspace'>To remove a <em>marker</em>, just drag it o | |
</p> </p> | |
</p><small>Page last updated: 2011-11-09</p> | </p><small>Page last updated: 2011-11-09</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Particle System Inspector'></a><h1>Particle Syst <hr><a name='Particle System Inspector'></a><h1>Particle Syst | |
<h2>The Particle System Inspector (Shuriken)</h2> | | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> <h2>The Particle System Inspector (Shuriken)</h2> | |
<p>The <span class='doc-menu'>Particle System Inspector</span <p>The <span class='doc-menu'>Particle System Inspector</span | |
</p><div><img class='figure' src='Images/manual/ParticleSyste </p><div><img class='figure' src='Images/manual/ParticleSyste | |
<p class='vspace'>Individual particle systems can take on var <p class='vspace'>Individual particle systems can take on var | |
</p> </p> | |
<p class='vspace'>They can also be extended by being grouped <p class='vspace'>They can also be extended by being grouped | |
</p> </p> | |
<p class='vspace'>If you press the button <span class='doc-me <p class='vspace'>If you press the button <span class='doc-me | |
</p> </p> | |
</p><small>Page last updated: 2012-01-16</p> | </p><small>Page last updated: 2012-01-16</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Particle System Modules Intro'></a><h1>Particle <hr><a name='Particle System Modules Intro'></a><h1>Particle | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>A Particle System consists of a predefined set of modules <p>A Particle System consists of a predefined set of modules | |
These modules describe the behavior of particles in an indivi These modules describe the behavior of particles in an indivi | |
</p> </p> | |
<p class='vspace'>Initially only a few modules are enabled. A <p class='vspace'>Initially only a few modules are enabled. A | |
You can add new modules by pressing the (+) sign in the top-r You can add new modules by pressing the (+) sign in the top-r | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>An alternative way to work with modules is <p class='vspace'>An alternative way to work with modules is | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Then you can enable / disable modules direc <p class='vspace'>Then you can enable / disable modules direc | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Most of the properties are controllable by <p class='vspace'>Most of the properties are controllable by | |
</p> </p> | |
<p class='vspace'>For details on individual modules and their | <p class='vspace'>For details on individual modules and their | |
</p> </p> | |
</p><small>Page last updated: 2012-01-13</p> | </p><small>Page last updated: 2012-01-13</p><br/> | |
<script type="text/javascript"> | <hr><a name='Particle System Modules40'></a><h1>Particle Syst | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Particle System Modules'></a><h1>Particle System < | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>This page is dedicated to individual modules and their pro <p>This page is dedicated to individual modules and their pro | |
</p> </p> | |
<div class='vspace'></div><h2>Initial Module </h2> <div class='vspace'></div><h2>Initial Module </h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>This module is always present, cannot be removed or disabl <p>This module is always present, cannot be removed or disabl | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>Duration</span> <tr ><td align='left'><span class='doc-prop'>Duration</span> | |
<tr ><td align='left'><span class='doc-prop'>Looping</span>< <tr ><td align='left'><span class='doc-prop'>Looping</span>< | |
<tr ><td align='left'><span class='doc-prop'>Prewarm</span>< <tr ><td align='left'><span class='doc-prop'>Prewarm</span>< | |
<tr ><td align='left'><span class='doc-prop'>Start Delay</sp <tr ><td align='left'><span class='doc-prop'>Start Delay</sp | |
<tr ><td align='left'><span class='doc-prop'>Start Lifetime< <tr ><td align='left'><span class='doc-prop'>Start Lifetime< | |
<tr ><td align='left'><span class='doc-prop'>Start Speed</sp <tr ><td align='left'><span class='doc-prop'>Start Speed</sp | |
<tr ><td align='left'><span class='doc-prop'>Start Size</spa <tr ><td align='left'><span class='doc-prop'>Start Size</spa | |
<tr ><td align='left'><span class='doc-prop'>Start Rotation< <tr ><td align='left'><span class='doc-prop'>Start Rotation< | |
<tr ><td align='left'><span class='doc-prop'>Start Color</sp <tr ><td align='left'><span class='doc-prop'>Start Color</sp | |
<tr ><td align='left'><span class='doc-prop'>Gravity Modifie <tr ><td align='left'><span class='doc-prop'>Gravity Modifie | |
<tr ><td align='left'><span class='doc-prop'>Inherit Velocit <tr ><td align='left'><span class='doc-prop'>Inherit Velocit | |
<tr ><td align='left'><span class='doc-prop'>Simulation Spac <tr ><td align='left'><span class='doc-prop'>Simulation Spac | |
<tr ><td align='left'><span class='doc-prop'>Play On Awake</ <tr ><td align='left'><span class='doc-prop'>Play On Awake</ | |
<tr ><td align='left'><span class='doc-prop'>Max Particles</ <tr ><td align='left'><span class='doc-prop'>Max Particles</ | |
</table> </table> | |
<div class='vspace'></div><h2>Emission Module</h2> <div class='vspace'></div><h2>Emission Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>Controls the rate of particles being emitted and allows sp <p>Controls the rate of particles being emitted and allows sp | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>Rate</span></td <tr ><td align='left'><span class='doc-prop'>Rate</span></td | |
<tr ><td align='left'><span class='doc-prop'>Bursts</span> ( <tr ><td align='left'><span class='doc-prop'>Bursts</span> ( | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table> </table> | |
<div class='vspace'></div><h2>Shape Module</h2> <div class='vspace'></div><h2>Shape Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>Defines the shape of the emitter: Sphere, Hemishpere, Cone <p>Defines the shape of the emitter: Sphere, Hemishpere, Cone | |
</p> </p> | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><span class='doc-prop'>Sphere</span></ <tr ><td align='left'><span class='doc-prop'>Sphere</span></ | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td align='left'><span class='doc-prop'>Hemisphere</spa <tr ><td align='left'><span class='doc-prop'>Hemisphere</spa | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td align='left'><span class='doc-prop'>Cone</span></td <tr ><td align='left'><span class='doc-prop'>Cone</span></td | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
> <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Box</span></td> <tr ><td align='left'><span class='doc-prop'>Box</span></td> | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td align='left'><span class='doc-prop'>Mesh</span></td <tr ><td align='left'><span class='doc-prop'>Mesh</span></td | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
</table> </table> | |
<div class='vspace'></div><h2>Velocity Over Lifetime Module</ <div class='vspace'></div><h2>Velocity Over Lifetime Module</ | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>Directly animates velocity of the particle. Mostly useful <p>Directly animates velocity of the particle. Mostly useful | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>XYZ</span></td> <tr ><td align='left'><span class='doc-prop'>XYZ</span></td> | |
<tr ><td align='left'><span class='doc-prop'>Space</span></t <tr ><td align='left'><span class='doc-prop'>Space</span></t | |
</table> </table> | |
<div class='vspace'></div><h2>Limit Velocity Over Lifetime Mo <div class='vspace'></div><h2>Limit Velocity Over Lifetime Mo | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>Basically can be used to simulate drag. Dampens or clamps <p>Basically can be used to simulate drag. Dampens or clamps | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>Separate Axis</ <tr ><td align='left'><span class='doc-prop'>Separate Axis</ | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Dampen</span></ <tr ><td align='left'><span class='doc-prop'>Dampen</span></ | |
</table> </table> | |
<div class='vspace'></div><h2>Force Over Lifetime Module</h2> <div class='vspace'></div><h2>Force Over Lifetime Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>XYZ</span></td> <tr ><td align='left'><span class='doc-prop'>XYZ</span></td> | |
<tr ><td align='left'><span class='doc-prop'>Randomize</span <tr ><td align='left'><span class='doc-prop'>Randomize</span | |
</table> </table> | |
<div class='vspace'></div><h2>Color Over Lifetime Module</h2> <div class='vspace'></div><h2>Color Over Lifetime Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Color</span></t | <tr ><td align='left'><span class='doc-prop'>Color</span></t | |
<tr ><td align='left'><span class='doc-prop'>Color Scale</sp <tr ><td align='left'><span class='doc-prop'>Color Scale</sp | |
</table> </table> | |
<div class='vspace'></div><h2>Color By Speed Module</h2> <div class='vspace'></div><h2>Color By Speed Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>Animates particle color based on its speed. Remaps speed i <p>Animates particle color based on its speed. Remaps speed i | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>Color</span></t <tr ><td align='left'><span class='doc-prop'>Color</span></t | |
<tr ><td align='left'><span class='doc-prop'>Color Scale</sp <tr ><td align='left'><span class='doc-prop'>Color Scale</sp | |
<tr ><td align='left'><span class='doc-prop'>Speed Range</sp <tr ><td align='left'><span class='doc-prop'>Speed Range</sp | |
</table> </table> | |
<div class='vspace'></div><h2>Size Over Lifetime Module</h2> <div class='vspace'></div><h2>Size Over Lifetime Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Size</span></td <tr ><td align='left'><span class='doc-prop'>Size</span></td | |
</table> </table> | |
<div class='vspace'></div><h2>Size By Speed Module</h2> <div class='vspace'></div><h2>Size By Speed Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Size</span></td <tr ><td align='left'><span class='doc-prop'>Size</span></td | |
<tr ><td align='left'><span class='doc-prop'>Speed Range</sp <tr ><td align='left'><span class='doc-prop'>Speed Range</sp | |
</table> </table> | |
<div class='vspace'></div><h2>Rotation Over Lifetime Module</ <div class='vspace'></div><h2>Rotation Over Lifetime Module</ | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>Specify values in degrees. <p>Specify values in degrees. | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>Rotational Spee <tr ><td align='left'><span class='doc-prop'>Rotational Spee | |
</table> </table> | |
<div class='vspace'></div><h2>Rotation By Speed Module</h2> <div class='vspace'></div><h2>Rotation By Speed Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Rotational Spee <tr ><td align='left'><span class='doc-prop'>Rotational Spee | |
<tr ><td align='left'><span class='doc-prop'>Speed Range</sp <tr ><td align='left'><span class='doc-prop'>Speed Range</sp | |
</table> </table> | |
> <div class='vspace'></div><h2>External Forces Module</h2> | |
> <div><img class='figure' src='Images/manual/ParticleSystemMod | |
> <table width='100%'><tr class='tableheader'><td class='prop' | |
> <tr ><td ><span class='doc-prop'>Multiplier</span></td><td >S | |
> </table> | |
<div class='vspace'></div><h2>Collision Module</h2> <div class='vspace'></div><h2>Collision Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>Set up collisions for the particles of this Particle Syste <p>Set up collisions for the particles of this Particle Syste | |
</p> </p> | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><span class='doc-prop'>Planes</span></ <tr ><td align='left'><span class='doc-prop'>Planes</span></ | |
<tr ><td align='left'><span class='doc-prop'>Dampen</span></ <tr ><td align='left'><span class='doc-prop'>Dampen</span></ | |
<tr ><td align='left'><span class='doc-prop'>Bounce</span></ <tr ><td align='left'><span class='doc-prop'>Bounce</span></ | |
<tr ><td align='left'><span class='doc-prop'>Lifetime Loss</ <tr ><td align='left'><span class='doc-prop'>Lifetime Loss</ | |
> <tr ><td align='left'><span class='doc-prop'>Particle Radius | |
<tr ><td align='left'><span class='doc-prop'>Visualization</ <tr ><td align='left'><span class='doc-prop'>Visualization</ | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Scale Plane</sp <tr ><td align='left'><span class='doc-prop'>Scale Plane</sp | |
</table> </table> | |
<div class='vspace'></div><h2>Sub Emitter Module</h2> <div class='vspace'></div><h2>Sub Emitter Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>This is a powerful module that enables spawning of other P <p>This is a powerful module that enables spawning of other P | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>Birth</span></t <tr ><td align='left'><span class='doc-prop'>Birth</span></t | |
<tr ><td align='left'><span class='doc-prop'>Death</span></t <tr ><td align='left'><span class='doc-prop'>Death</span></t | |
<tr ><td align='left'><span class='doc-prop'>Collision</span <tr ><td align='left'><span class='doc-prop'>Collision</span | |
</table> </table> | |
<div class='vspace'></div><h2>Texture Sheet Animation Module <div class='vspace'></div><h2>Texture Sheet Animation Module | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>Animates UV coordinates of the particle over its lifetime. <p>Animates UV coordinates of the particle over its lifetime. | |
</p><div class='property-IMPORTANT'>IMPORTANT: The texture us </p><div class='property-IMPORTANT'>IMPORTANT: The texture us | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Tiles</span></t <tr ><td align='left'><span class='doc-prop'>Tiles</span></t | |
<tr ><td align='left'><span class='doc-prop'>Animation</span <tr ><td align='left'><span class='doc-prop'>Animation</span | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
</table> </table> | |
<p class='vspace'><a name='RendererModule' id='RendererModule <p class='vspace'><a name='RendererModule' id='RendererModule | |
</p><h2>Renderer Module</h2> </p><h2>Renderer Module</h2> | |
<div><img class='figure' src='Images/manual/ParticleSystemMod | <div><img class='figure' src='Images/manual/ParticleSystemMod | |
<p>The renderer module exposes the <span class='doc-prop'>Par <p>The renderer module exposes the <span class='doc-prop'>Par | |
</p> </p> | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><span class='doc-prop'>Render Mode</sp <tr ><td align='left'><span class='doc-prop'>Render Mode</sp | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
> <tr ><td align='left'><span class='doc-prop'>Normal Directio | |
<tr ><td align='left'><span class='doc-prop'>Material</span> <tr ><td align='left'><span class='doc-prop'>Material</span> | |
<tr ><td align='left'><span class='doc-prop'>Sort Mode</span <tr ><td align='left'><span class='doc-prop'>Sort Mode</span | |
<tr ><td align='left'><span class='doc-prop'>Sorting Fudge</ <tr ><td align='left'><span class='doc-prop'>Sorting Fudge</ | |
<tr ><td align='left'><span class='doc-prop'>Cast Shadows</s <tr ><td align='left'><span class='doc-prop'>Cast Shadows</s | |
<tr ><td align='left'><span class='doc-prop'>Receive Shadows <tr ><td align='left'><span class='doc-prop'>Receive Shadows | |
<tr ><td align='left'><span class='doc-prop'>Max Particle Si <tr ><td align='left'><span class='doc-prop'>Max Particle Si | |
</table> </table> | |
<div class='vspace'></div> <div class='vspace'></div> | |
</p><small>Page last updated: 2012-06-25</p> | </p><small>Page last updated: 2012-06-27</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Particle System Grouping'></a><h1>Particle Syste <hr><a name='Particle System Grouping'></a><h1>Particle Syste | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>An important feature of Unity's Particle System is that in <p>An important feature of Unity's Particle System is that in | |
</p> </p> | |
<p class='vspace'>For managing complex particle effects, Unit <p class='vspace'>For managing complex particle effects, Unit | |
</p><div><img class='figure' src='Images/manual/ParticleSyste </p><div><img class='figure' src='Images/manual/ParticleSyste | |
<p><em>Overview of the <span class='doc-keyword'>Particle Sys <p><em>Overview of the <span class='doc-keyword'>Particle Sys | |
</p> </p> | |
<p class='vspace'>You can toggle between <span class='doc-men <p class='vspace'>You can toggle between <span class='doc-men | |
</p> </p> | |
<p class='vspace'>You can explicitly control rendering order | <p class='vspace'>You can explicitly control rendering order | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Particle Systems in the same hierarchy is considered a <p><em>Particle Systems in the same hierarchy is considered a | |
</p> </p> | |
</p><small>Page last updated: 2012-01-24</p> | </p><small>Page last updated: 2012-01-24</p><br/> | |
<script type="text/javascript"> | <hr><a name='AnimationEditorGuide40'></a><h1>AnimationEditorG | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Animation'></a><h1>Animation</h1> < | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>The <span class='doc-keyword'>Animation View</span> in Uni <p>The <span class='doc-keyword'>Animation View</span> in Uni | |
</p> </p> | |
<p class='vspace'>See the pages about <a href="Manual/Animati | <p class='vspace'>See the pages about <span style='font-size: | |
</p> </p> | |
<p class='vspace'>The Animation View Guide is broken up into <p class='vspace'>The Animation View Guide is broken up into | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/animeditor- | <div class='vspace'></div><h2><span style='font-size: 110%; f | |
<div><a href="Components/animeditor-UsingAnimationEditor.html | <div><span style='font-size: 110%; font-weight: bold; color: | |
<p class='vspace'>This section covers the basic operations of <p class='vspace'>This section covers the basic operations of | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/animeditor- | <div class='vspace'></div><h2><span style='font-size: 110%; f | |
<div><a href="Components/animeditor-AnimationCurves.html"><im | <div><span style='font-size: 110%; font-weight: bold; color: | |
<p class='vspace'>This section explains how to create <span c <p class='vspace'>This section explains how to create <span c | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/EditingCurv | <div class='vspace'></div><h2><span style='font-size: 110%; f | |
<div><a href="Components/EditingCurves.html"><img class='figu | <div><span style='font-size: 110%; font-weight: bold; color: | |
<p class='vspace'>This section explains how to navigate effic <p class='vspace'>This section explains how to navigate effic | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/animeditor- | <div class='vspace'></div><h2><span style='font-size: 110%; f | |
<div><a href="Components/animeditor-MultipleParts.html"><img | <div><span style='font-size: 110%; font-weight: bold; color: | |
<p class='vspace'>This section explains how to animate <span <p class='vspace'>This section explains how to animate <span | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/animeditor- | <div class='vspace'></div><h2><span style='font-size: 110%; f | |
<div><a href="Components/animeditor-AnimationEvents.html"><im | <div><span style='font-size: 110%; font-weight: bold; color: | |
<p class='vspace'>This section explains how to add <span clas <p class='vspace'>This section explains how to add <span clas | |
</p> </p> | |
</p><small>Page last updated: 2010-06-30</p> | </p><small>Page last updated: 2012-07-05</p><br/> | |
<script type="text/javascript"> | <hr><a name='Animation Scripting 40'></a><h1>Animation Script | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Animation Scripting'></a><h1>Animation Scripting < | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity's Animation System allows you to create beautifully <p>Unity's Animation System allows you to create beautifully | |
</p> </p> | |
<p class='vspace'>Making an animated character involves two t <p class='vspace'>Making an animated character involves two t | |
</p> </p> | |
<p class='vspace'>You can download <a class='urllink' href='h <p class='vspace'>You can download <a class='urllink' href='h | |
</p> </p> | |
<p class='vspace'>This page contains the following sections:- <p class='vspace'>This page contains the following sections:- | |
</p> </p> | |
<div class='vspace'></div><ul><li><a href='#AnimBlend'>Animat <div class='vspace'></div><ul><li><a href='#AnimBlend'>Animat | |
</li><li><a href='#AnimLayers'>Animation Layers</a> </li><li><a href='#AnimLayers'>Animation Layers</a> | |
</li><li><a href='#AnimMixing'>Animation Mixing</a> </li><li><a href='#AnimMixing'>Animation Mixing</a> | |
</li><li><a href='#Additive'>Additive Animation</a> </li><li><a href='#Additive'>Additive Animation</a> | |
</li><li><a href='#Procedural'>Procedural Animation</a> </li><li><a href='#Procedural'>Procedural Animation</a> | |
</li><li><a href='#Playback'>Animation Playback and Sampling< </li><li><a href='#Playback'>Animation Playback and Sampling< | |
</li></ul><p class='vspace'><a name='AnimBlend' id='AnimBlend </li></ul><p class='vspace'><a name='AnimBlend' id='AnimBlend | |
</p> </p> | |
<div class='vspace'></div><h2>Animation Blending</h2> <div class='vspace'></div><h2>Animation Blending</h2> | |
<p>In today's games, animation blending is an essential featu <p>In today's games, animation blending is an essential featu | |
</p> </p> | |
<p class='vspace'>This is where animation blending comes in. <p class='vspace'>This is where animation blending comes in. | |
</p> </p> | |
<p class='vspace'>Our first step will be to make a character <p class='vspace'>Our first step will be to make a character | |
</p> </p> | |
<p class='vspace'>Our first script for animating the characte <p class='vspace'>Our first script for animating the characte | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>function U <div class='vspace'></div><pre class='codelisting'>function U | |
if (Input.GetAxis("Vertical") > 0.2) if (Input.GetAxis("Vertical") > 0.2) | |
animation.CrossFade ("walk"); animation.CrossFade ("walk"); | |
else else | |
animation.CrossFade ("idle"); animation.CrossFade ("idle"); | |
} </pre> } </pre> | |
<p class='vspace'>To use this script in your project:- <p class='vspace'>To use this script in your project:- | |
</p><ol><li>Create a Javascript file using <span class='doc-m </p><ol><li>Create a Javascript file using <span class='doc-m | |
</li><li>Copy and paste the code into it </li><li>Copy and paste the code into it | |
</li><li>Drag the script onto the character (it needs to be a </li><li>Drag the script onto the character (it needs to be a | |
</li></ol><p class='vspace'>When you hit the Play button, the </li></ol><p class='vspace'>When you hit the Play button, the | |
</p> </p> | |
<p class='vspace'><a name='AnimLayers' id='AnimLayers'></a> <p class='vspace'><a name='AnimLayers' id='AnimLayers'></a> | |
</p> </p> | |
<div class='vspace'></div><h2>Animation Layers</h2> <div class='vspace'></div><h2>Animation Layers</h2> | |
<p>Layers are an incredibly useful concept that allow you to <p>Layers are an incredibly useful concept that allow you to | |
</p> </p> | |
<p class='vspace'>Unity's animation system can blend between <p class='vspace'>Unity's animation system can blend between | |
</p> </p> | |
<div class='vspace'></div><h3>Blend weights are always normal <div class='vspace'></div><h3>Blend weights are always normal | |
<p>Let's say you have a walk cycle and a run cycle, both havi <p>Let's say you have a walk cycle and a run cycle, both havi | |
</p> </p> | |
<p class='vspace'>However, you will generally want to priorit <p class='vspace'>However, you will generally want to priorit | |
</p> </p> | |
<p class='vspace'><a name='LayerExample' id='LayerExample'></ <p class='vspace'><a name='LayerExample' id='LayerExample'></ | |
</p> </p> | |
<div class='vspace'></div><h3>Layering Example</h3> <div class='vspace'></div><h3>Layering Example</h3> | |
<p>As an example, you might have a shoot animation, an idle a <p>As an example, you might have a shoot animation, an idle a | |
</p> </p> | |
<p class='vspace'>The easiest way to do this is to simply kee <p class='vspace'>The easiest way to do this is to simply kee | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>function S <div class='vspace'></div><pre class='codelisting'>function S | |
// Set all animations to loop // Set all animations to loop | |
animation.wrapMode = WrapMode.Loop; animation.wrapMode = WrapMode.Loop; | |
// except shooting // except shooting | |
animation["shoot"].wrapMode = WrapMode.Once; animation["shoot"].wrapMode = WrapMode.Once; | |
// Put idle and walk into lower layers (The default layer // Put idle and walk into lower layers (The default layer | |
// This will do two things // This will do two things | |
// - Since shoot and idle/walk are in different layers the // - Since shoot and idle/walk are in different layers the | |
// each other's playback when calling CrossFade. // each other's playback when calling CrossFade. | |
// - Since shoot is in a higher layer, the animation will // - Since shoot is in a higher layer, the animation will | |
// animations when faded in. // animations when faded in. | |
animation["shoot"].layer = 1; animation["shoot"].layer = 1; | |
// Stop animations that are already playing // Stop animations that are already playing | |
//(In case user forgot to disable play automatically) //(In case user forgot to disable play automatically) | |
animation.Stop(); animation.Stop(); | |
} } | |
function Update () { function Update () { | |
// Based on the key that is pressed, // Based on the key that is pressed, | |
// play the walk animation or the idle animation // play the walk animation or the idle animation | |
if (Mathf.Abs(Input.GetAxis("Vertical")) > 0.1) if (Mathf.Abs(Input.GetAxis("Vertical")) > 0.1) | |
animation.CrossFade("walk"); animation.CrossFade("walk"); | |
else else | |
animation.CrossFade("idle"); animation.CrossFade("idle"); | |
// Shoot // Shoot | |
if (Input.GetButtonDown ("Fire1")) if (Input.GetButtonDown ("Fire1")) | |
animation.CrossFade("shoot"); animation.CrossFade("shoot"); | |
} </pre> } </pre> | |
<p class='vspace'>By default the <span class='doc-prop'>anima <p class='vspace'>By default the <span class='doc-prop'>anima | |
</p> </p> | |
<p class='vspace'><a name='AnimMixing' id='AnimMixing'></a> <p class='vspace'><a name='AnimMixing' id='AnimMixing'></a> | |
</p> </p> | |
<div class='vspace'></div><h2>Animation Mixing</h2> <div class='vspace'></div><h2>Animation Mixing</h2> | |
<p>Animation mixing allow you to cut down on the number of an <p>Animation mixing allow you to cut down on the number of an | |
</p> </p> | |
<p class='vspace'>You add an animation mixing transform to an <p class='vspace'>You add an animation mixing transform to an | |
</p> </p> | |
<p class='vspace'><a name='MixingExample' id='MixingExample'> <p class='vspace'><a name='MixingExample' id='MixingExample'> | |
</p> </p> | |
<div class='vspace'></div><h3>Mixing Example</h3> <div class='vspace'></div><h3>Mixing Example</h3> | |
<p>An example of mixing might be something like a hand-waving <p>An example of mixing might be something like a hand-waving | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>/// Adds a <div class='vspace'></div><pre class='codelisting'>/// Adds a | |
var shoulder : Transform; var shoulder : Transform; | |
animation["wave_hand"].AddMixingTransform(shoulder);</pre> animation["wave_hand"].AddMixingTransform(shoulder);</pre> | |
<p class='vspace'>Another example using a path. <p class='vspace'>Another example using a path. | |
</p><pre class='codelisting'>function Start () { </p><pre class='codelisting'>function Start () { | |
// Adds a mixing transform using a path instead // Adds a mixing transform using a path instead | |
var mixTransform : Transform = transform.Find("root/upper_ var mixTransform : Transform = transform.Find("root/upper_ | |
animation["wave_hand"].AddMixingTransform(mixTransform); animation["wave_hand"].AddMixingTransform(mixTransform); | |
}</pre> }</pre> | |
<p class='vspace'><a name='Additive' id='Additive'></a> <p class='vspace'><a name='Additive' id='Additive'></a> | |
</p> </p> | |
<div class='vspace'></div><h2>Additive Animations</h2> <div class='vspace'></div><h2>Additive Animations</h2> | |
<p>Additive animations and animation mixing allow you to cut <p>Additive animations and animation mixing allow you to cut | |
</p> </p> | |
<p class='vspace'>Suppose you want to create a character that <p class='vspace'>Suppose you want to create a character that | |
</p> </p> | |
<div class='vspace'></div><h3>Additive Animation Example</h3> <div class='vspace'></div><h3>Additive Animation Example</h3> | |
<p>Additive animations allow you to overlay the effects of on <p>Additive animations allow you to overlay the effects of on | |
</p> </p> | |
<p class='vspace'>Referring to the previous example, you coul <p class='vspace'>Referring to the previous example, you coul | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'>private va <div class='vspace'></div><pre class='codelisting'>private va | |
private var leanRight : AnimationState; private var leanRight : AnimationState; | |
function Start () { function Start () { | |
leanLeft = animation["leanLeft"]; leanLeft = animation["leanLeft"]; | |
leanRight = animation["leanRight"]; leanRight = animation["leanRight"]; | |
// Put the leaning animation in a separate layer // Put the leaning animation in a separate layer | |
// So that other calls to CrossFade won't affect it. // So that other calls to CrossFade won't affect it. | |
leanLeft.layer = 10; leanLeft.layer = 10; | |
leanRight.layer = 10; leanRight.layer = 10; | |
// Set the lean animation to be additive // Set the lean animation to be additive | |
leanLeft.blendMode = AnimationBlendMode.Additive; leanLeft.blendMode = AnimationBlendMode.Additive; | |
leanRight.blendMode = AnimationBlendMode.Additive; leanRight.blendMode = AnimationBlendMode.Additive; | |
// Set the lean animation ClampForever // Set the lean animation ClampForever | |
// With ClampForever animations will not stop // With ClampForever animations will not stop | |
// automatically when reaching the end of the clip // automatically when reaching the end of the clip | |
leanLeft.wrapMode = WrapMode.ClampForever; leanLeft.wrapMode = WrapMode.ClampForever; | |
leanRight.wrapMode = WrapMode.ClampForever; leanRight.wrapMode = WrapMode.ClampForever; | |
// Enable the animation and fade it in completely // Enable the animation and fade it in completely | |
// We don't use animation.Play here because we manually ad // We don't use animation.Play here because we manually ad | |
// in the Update function. // in the Update function. | |
// Instead we just enable the animation and set it to full // Instead we just enable the animation and set it to full | |
leanRight.enabled = true; leanRight.enabled = true; | |
leanLeft.enabled = true; leanLeft.enabled = true; | |
leanRight.weight = 1.0; leanRight.weight = 1.0; | |
leanLeft.weight = 1.0; leanLeft.weight = 1.0; | |
// For testing just play "walk" animation and loop it // For testing just play "walk" animation and loop it | |
animation["walk"].wrapMode = WrapMode.Loop; animation["walk"].wrapMode = WrapMode.Loop; | |
animation.Play("walk"); animation.Play("walk"); | |
} } | |
// Every frame just set the normalized time // Every frame just set the normalized time | |
// based on how much lean we want to apply // based on how much lean we want to apply | |
function Update () { function Update () { | |
var lean = Input.GetAxis("Horizontal"); var lean = Input.GetAxis("Horizontal"); | |
// normalizedTime is 0 at the first frame and 1 at the las // normalizedTime is 0 at the first frame and 1 at the las | |
leanLeft.normalizedTime = -lean; leanLeft.normalizedTime = -lean; | |
leanRight.normalizedTime = lean; leanRight.normalizedTime = lean; | |
} </pre> } </pre> | |
<p class='vspace'><b>Tip:</b> When using Additive animations, <p class='vspace'><b>Tip:</b> When using Additive animations, | |
</p> </p> | |
<p class='vspace'><a name='Procedural' id='Procedural'></a> <p class='vspace'><a name='Procedural' id='Procedural'></a> | |
</p> </p> | |
<div class='vspace'></div><h2>Animating Characters Procedural <div class='vspace'></div><h2>Animating Characters Procedural | |
<p>Sometimes you want to animate the bones of your character <p>Sometimes you want to animate the bones of your character | |
</p> </p> | |
<p class='vspace'>One important thing to know is that the ani <p class='vspace'>One important thing to know is that the ani | |
</p> </p> | |
<p class='vspace'>Ragdolls are created in the same way. You s <p class='vspace'>Ragdolls are created in the same way. You s | |
</p> </p> | |
<p class='vspace'><a name='Playback' id='Playback'></a> <p class='vspace'><a name='Playback' id='Playback'></a> | |
</p> </p> | |
<div class='vspace'></div><h2>Animation Playback and Sampling <div class='vspace'></div><h2>Animation Playback and Sampling | |
<p>This section explains how animations in Unity are sampled <p>This section explains how animations in Unity are sampled | |
</p> </p> | |
<p class='vspace'>AnimationClips are typically authored at a <p class='vspace'>AnimationClips are typically authored at a | |
</p> </p> | |
<p class='vspace'>However, games typically run at a variable <p class='vspace'>However, games typically run at a variable | |
</p> </p> | |
<p class='vspace'>As a result, Unity must sample an animation <p class='vspace'>As a result, Unity must sample an animation | |
</p> </p> | |
<p class='vspace'>For most practical purposes, you can ignore | <p class='vspace'>For most practical purposes, you can ignore | |
</p> </p> | |
<p class='vspace'>Note also that as a consequence of the vari <p class='vspace'>Note also that as a consequence of the vari | |
</p> </p> | |
</p><small>Page last updated: 2012-04-26</p> | </p><small>Page last updated: 2012-07-05</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Navmesh and Pathfinding'></a><h1>Navmesh and Pat <hr><a name='Navmesh and Pathfinding'></a><h1>Navmesh and Pat | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>A navigation mesh (also known as the <em>Navmesh</em>) is <p>A navigation mesh (also known as the <em>Navmesh</em>) is | |
</p> </p> | |
<p class='vspace'>In the complex world of games, there can be <p class='vspace'>In the complex world of games, there can be | |
</p> </p> | |
<p class='vspace'>Here is a simple example of how to set up a <p class='vspace'>Here is a simple example of how to set up a | |
</p> </p> | |
<div class='vspace'></div><ul><li>Create some geometry in the <div class='vspace'></div><ul><li>Create some geometry in the | |
</li><li>In the Inspector Window's right hand corner click on </li><li>In the Inspector Window's right hand corner click on | |
</li></ul><div class='indent'><img class='figure' src='Images </li></ul><div class='indent'><img class='figure' src='Images | |
</div><div class='vspace'></div><ul><li>Pull up the Navigatio </div><div class='vspace'></div><ul><li>Pull up the Navigatio | |
</li><li><a href="Manual/Navmeshbaking.html">Bake the mesh</a </li><li><a href="Manual/Navmeshbaking.html">Bake the mesh</a | |
</li><li>Create some dynamic geometry in the scene (such as c </li><li>Create some dynamic geometry in the scene (such as c | |
</li><li>Set up an agent (or multiple agents), by adding a <a </li><li>Set up an agent (or multiple agents), by adding a <a | |
</li><li>Give the agent a destination (by setting the <em>des </li><li>Give the agent a destination (by setting the <em>des | |
</li><li>Press play and watch the magic. </li><li>Press play and watch the magic. | |
</li></ul><p class='vspace'>Note that it is also possible to </li></ul><p class='vspace'>Note that it is also possible to | |
</p> </p> | |
<div class='vspace'></div><h2>Automatic off-mesh links</h2> <div class='vspace'></div><h2>Automatic off-mesh links</h2> | |
<p>Navmesh geometry can also be marked up for automatic off-m <p>Navmesh geometry can also be marked up for automatic off-m | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Marking up geometry for automatic off-mesh link genera <p><em>Marking up geometry for automatic off-mesh link genera | |
</p> </p> | |
<p class='vspace'>Geometry marked up in this way will be chec <p class='vspace'>Geometry marked up in this way will be chec | |
</p> </p> | |
<p class='vspace'>The NavMeshLayer assigned to auto-generated <p class='vspace'>The NavMeshLayer assigned to auto-generated | |
</p> </p> | |
<p class='vspace'>Note, that there is also a possibility for <p class='vspace'>Note, that there is also a possibility for | |
</p> </p> | |
</p><small>Page last updated: 2012-04-24</p> | </p><small>Page last updated: 2012-04-24</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Navmesh Baking'></a><h1>Navmesh Baking</h1> <hr><a name='Navmesh Baking'></a><h1>Navmesh Baking</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Once the Navmesh geometry and layers are marked up, it's t <p>Once the Navmesh geometry and layers are marked up, it's t | |
</p> </p> | |
<p class='vspace'>Inside the Navigation window (<span class=' <p class='vspace'>Inside the Navigation window (<span class=' | |
</p><div><img class='figure' src='Images/manual/Navmeshbaking </p><div><img class='figure' src='Images/manual/Navmeshbaking | |
<p><em>Navigation Bake Window</em> <p><em>Navigation Bake Window</em> | |
</p> </p> | |
<p class='vspace'>Here are the properties that affect Navmesh <p class='vspace'>Here are the properties that affect Navmesh | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td ><span class='doc-prop'>Radius</span></td><td >radiu <tr ><td ><span class='doc-prop'>Radius</span></td><td >radiu | |
<tr ><td align='left'><span class='doc-prop'>Height</span></ <tr ><td align='left'><span class='doc-prop'>Height</span></ | |
<tr ><td align='left'><span class='doc-prop'>Max Slope</span <tr ><td align='left'><span class='doc-prop'>Max Slope</span | |
<tr ><td align='left'><span class='doc-prop'>Step height</sp <tr ><td align='left'><span class='doc-prop'>Step height</sp | |
<tr ><td align='left'><span class='doc-prop'>Drop height</sp <tr ><td align='left'><span class='doc-prop'>Drop height</sp | |
<tr ><td align='left'><span class='doc-prop'>Jump distance</ <tr ><td align='left'><span class='doc-prop'>Jump distance</ | |
<tr ><td ><span class='doc-prop'>Advanced</span></td></tr> <tr ><td ><span class='doc-prop'>Advanced</span></td></tr> | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
<tr ><td ><span style='padding-left: 1.5em;'><span class='do <tr ><td ><span style='padding-left: 1.5em;'><span class='do | |
</table> </table> | |
<p class='vspace'>Note that the baked navmesh is part of the <p class='vspace'>Note that the baked navmesh is part of the | |
</p> </p> | |
<p class='vspace'>(back to <a href="Manual/NavmeshandPathfind <p class='vspace'>(back to <a href="Manual/NavmeshandPathfind | |
</p> </p> | |
</p><small>Page last updated: 2012-04-24</p> | </p><small>Page last updated: 2012-04-24</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Sound'></a><h1>Sound</h1> <hr><a name='Sound'></a><h1>Sound</h1> | |
<div class='vspace'></div><h1>Audio Listener</h1> | | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> <div class='vspace'></div><h1>Audio Listener</h1> | |
<p>The <span class='doc-keyword'>Audio Listener</span> acts a <p>The <span class='doc-keyword'>Audio Listener</span> acts a | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<p>The Audio Listener has no properties. It simply must be a <p>The Audio Listener has no properties. It simply must be a | |
</p> </p> | |
<div class='vspace'></div><h2>Details</h2> <div class='vspace'></div><h2>Details</h2> | |
<p>The Audio Listener works in conjunction with <a href="Comp <p>The Audio Listener works in conjunction with <a href="Comp | |
</p> </p> | |
<p class='vspace'>If the Sources are 3D (see import settings <p class='vspace'>If the Sources are 3D (see import settings | |
</p> </p> | |
<p class='vspace'>You should attach the Audio Listener to eit <p class='vspace'>You should attach the Audio Listener to eit | |
</p> </p> | |
<div class='vspace'></div><h2>Hints</h2> <div class='vspace'></div><h2>Hints</h2> | |
<ul><li>Each scene can only have one Audio Listener. <ul><li>Each scene can only have one Audio Listener. | |
</li><li>You access the project-wide audio settings using the </li><li>You access the project-wide audio settings using the | |
</li><li>View the <a href="Components/class-AudioClip.html">A </li><li>View the <a href="Components/class-AudioClip.html">A | |
</li></ul><h1>Audio Source</h1> </li></ul><h1>Audio Source</h1> | |
<p>The <span class='doc-keyword'>Audio Source</span> plays ba <p>The <span class='doc-keyword'>Audio Source</span> plays ba | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Audio Clip</spa <tr ><td align='left'><span class='doc-prop'>Audio Clip</spa | |
<tr ><td align='left'><span class='doc-prop'>Mute</span></td <tr ><td align='left'><span class='doc-prop'>Mute</span></td | |
<tr ><td align='left'><span class='doc-prop'>Bypass Effects< <tr ><td align='left'><span class='doc-prop'>Bypass Effects< | |
<tr ><td align='left'><span class='doc-prop'>Play On Awake</ <tr ><td align='left'><span class='doc-prop'>Play On Awake</ | |
<tr ><td align='left'><span class='doc-prop'>Loop</span></td <tr ><td align='left'><span class='doc-prop'>Loop</span></td | |
<tr ><td align='left'><span class='doc-prop'>Priority</span> <tr ><td align='left'><span class='doc-prop'>Priority</span> | |
<tr ><td align='left'><span class='doc-prop'>Volume</span></ <tr ><td align='left'><span class='doc-prop'>Volume</span></ | |
<tr ><td align='left'><span class='doc-prop'>Pitch</span></t <tr ><td align='left'><span class='doc-prop'>Pitch</span></t | |
<tr ><td ><span class='doc-prop'><b>3D Sound Settings</b></sp <tr ><td ><span class='doc-prop'><b>3D Sound Settings</b></sp | |
<tr ><td align='left'><span class='doc-prop'>Pan Level</span <tr ><td align='left'><span class='doc-prop'>Pan Level</span | |
<tr ><td align='left'><span class='doc-prop'>Spread</span></ <tr ><td align='left'><span class='doc-prop'>Spread</span></ | |
<tr ><td align='left'><span class='doc-prop'>Doppler Level</ <tr ><td align='left'><span class='doc-prop'>Doppler Level</ | |
<tr ><td align='left'><span class='doc-prop'>Min Distance</s <tr ><td align='left'><span class='doc-prop'>Min Distance</s | |
<tr ><td align='left'><span class='doc-prop'>Max Distance</s <tr ><td align='left'><span class='doc-prop'>Max Distance</s | |
<tr ><td align='left'><span class='doc-prop'>Rolloff Mode</s <tr ><td align='left'><span class='doc-prop'>Rolloff Mode</s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td ><span class='doc-prop'><b>2D Sound Settings</b></sp <tr ><td ><span class='doc-prop'><b>2D Sound Settings</b></sp | |
<tr ><td align='left'><span class='doc-prop'>Pan 2D</span></ <tr ><td align='left'><span class='doc-prop'>Pan 2D</span></ | |
</table> </table> | |
<p class='vspace'><a name='rolloff' id='rolloff'></a> <p class='vspace'><a name='rolloff' id='rolloff'></a> | |
</p><h2>Types of Rolloff</h2> </p><h2>Types of Rolloff</h2> | |
<p>There are three Rolloff modes: Logarithmic, Linear and Cus <p>There are three Rolloff modes: Logarithmic, Linear and Cus | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Distance Functions</h2> <div class='vspace'></div><h2>Distance Functions</h2> | |
<p>There are several properties of the audio that can be modi <p>There are several properties of the audio that can be modi | |
</p> </p> | |
<p class='vspace'><span style='color: red;'><span class='doc <p class='vspace'><span style='color: red;'><span class='doc | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>To modify the distance functions, you can e | <p class='vspace'>To modify the distance functions, you can e | |
</p> </p> | |
<div class='vspace'></div><h2>Creating Audio Sources</h2> <div class='vspace'></div><h2>Creating Audio Sources</h2> | |
<p>Audio Sources don't do anything without an assigned <span <p>Audio Sources don't do anything without an assigned <span | |
</p> </p> | |
<p class='vspace'>To create a new Audio Source: <p class='vspace'>To create a new Audio Source: | |
</p><ol><li>Import your audio files into your Unity Project. </p><ol><li>Import your audio files into your Unity Project. | |
</li><li>Go to <span class='doc-menu'>GameObject->Create E </li><li>Go to <span class='doc-menu'>GameObject->Create E | |
</li><li>With the new GameObject selected, select <span class </li><li>With the new GameObject selected, select <span class | |
</li><li>Assign the <span class='doc-prop'>Audio Clip</span> </li><li>Assign the <span class='doc-prop'>Audio Clip</span> | |
</li></ol><p class='vspace'><b>Note:</b> If you want to creat </li></ol><p class='vspace'><b>Note:</b> If you want to creat | |
</p> </p> | |
<div class='vspace'></div><h2>Platform specific details</h2> <div class='vspace'></div><h2>Platform specific details</h2> | |
<a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i <a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i | |
<div class='specific-ios' style='display: block;' id='specifi <div class='specific-ios' style='display: block;' id='specifi | |
<p>On mobile platforms compressed audio is encoded as MP3 for <p>On mobile platforms compressed audio is encoded as MP3 for | |
For performance reasons audio clips can be played back using For performance reasons audio clips can be played back using | |
</p></div> </p></div> | |
<a class='androidRef' id='androidRef' href="javascript:ShowHi <a class='androidRef' id='androidRef' href="javascript:ShowHi | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<p>On mobile platforms compressed audio is encoded as MP3 for <p>On mobile platforms compressed audio is encoded as MP3 for | |
</p></div> </p></div> | |
<h1>Audio Clip</h1> <h1>Audio Clip</h1> | |
<p><span class='doc-keyword'>Audio Clips</span> contain the a <p><span class='doc-keyword'>Audio Clips</span> contain the a | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<div class='vspace'></div><h2>Properties</h2> <div class='vspace'></div><h2>Properties</h2> | |
<table width='100%'><tr class='tableheader'><td class='prop' <table width='100%'><tr class='tableheader'><td class='prop' | |
<tr ><td align='left'><span class='doc-prop'>Audio Format</s <tr ><td align='left'><span class='doc-prop'>Audio Format</s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>3D Sound</span> <tr ><td align='left'><span class='doc-prop'>3D Sound</span> | |
<tr ><td align='left'><span class='doc-prop'>Force to mono</ <tr ><td align='left'><span class='doc-prop'>Force to mono</ | |
<tr ><td align='left'><span class='doc-prop'>Load Type</span <tr ><td align='left'><span class='doc-prop'>Load Type</span | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span style='padding-left: 1.5em;'><s <tr ><td align='left'><span style='padding-left: 1.5em;'><s | |
<tr ><td align='left'><span class='doc-prop'>Compression</sp <tr ><td align='left'><span class='doc-prop'>Compression</sp | |
</table><div class='specific-ios' style='display: block;' id= </table><div class='specific-ios' style='display: block;' id= | |
<table width='100%'><tr ><td align='left'><span class='doc-p <table width='100%'><tr ><td align='left'><span class='doc-p | |
</table></div> </table></div> | |
<table width='100%'><tr ><td align='left'><span class='doc-p <table width='100%'><tr ><td align='left'><span class='doc-p | |
</table> </table> | |
<div class='vspace'></div><h2>Importing Audio Assets</h2> <div class='vspace'></div><h2>Importing Audio Assets</h2> | |
<p>Unity supports both <em>Compressed</em> and <em>Native</em <p>Unity supports both <em>Compressed</em> and <em>Native</em | |
</p> </p> | |
<p class='vspace'>As a general rule of thumb, <em>Compressed< <p class='vspace'>As a general rule of thumb, <em>Compressed< | |
</p> </p> | |
<p class='vspace'><a name='PositionalAudio' id='PositionalAud <p class='vspace'><a name='PositionalAudio' id='PositionalAud | |
</p><h2>Using 3D Audio</h2> </p><h2>Using 3D Audio</h2> | |
<p>If an audio clip is marked as a <span class='doc-prop'>3D <p>If an audio clip is marked as a <span class='doc-prop'>3D | |
</p> </p> | |
<div class='vspace'></div><h2>Platform specific details</h2> <div class='vspace'></div><h2>Platform specific details</h2> | |
<a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i <a class='iosRef' id='iosRef' href="javascript:ShowHideDiv('i | |
<div class='specific-ios' style='display: block;' id='specifi <div class='specific-ios' style='display: block;' id='specifi | |
<p>On mobile platforms compressed audio is encoded as MP3 to <p>On mobile platforms compressed audio is encoded as MP3 to | |
</p> </p> | |
<p class='vspace'>To improve performance, audio clips can be <p class='vspace'>To improve performance, audio clips can be | |
Note that only one hardware audio stream can be decompressed Note that only one hardware audio stream can be decompressed | |
</p> </p> | |
<p class='vspace'>If the hardware decoder is not available, t <p class='vspace'>If the hardware decoder is not available, t | |
</p></div> </p></div> | |
<a class='androidRef' id='androidRef' href="javascript:ShowHi <a class='androidRef' id='androidRef' href="javascript:ShowHi | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<p>On mobile platforms compressed audio is encoded as MP3 to <p>On mobile platforms compressed audio is encoded as MP3 to | |
</p> </p> | |
<div class='vspace'></div></div> <div class='vspace'></div></div> | |
</p><small>Page last updated: 2007-11-16</p> | </p><small>Page last updated: 2007-11-16</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Game Interface Elements'></a><h1>Game Interface <hr><a name='Game Interface Elements'></a><h1>Game Interface | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity gives you a number of options for creating your game <p>Unity gives you a number of options for creating your game | |
</p> </p> | |
<p class='vspace'>The rest of this page contains a detailed g <p class='vspace'>The rest of this page contains a detailed g | |
</p> </p> | |
<div class='vspace'></div><h1>GUI Scripting Guide</h1> <div class='vspace'></div><h1>GUI Scripting Guide</h1> | |
<div class='vspace'></div><h2>Overview</h2> <div class='vspace'></div><h2>Overview</h2> | |
<p>UnityGUI allows you to create a wide variety of highly fun <p>UnityGUI allows you to create a wide variety of highly fun | |
</p> </p> | |
<p class='vspace'>For example, the following code will create <p class='vspace'>For example, the following code will create | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'> <div class='vspace'></div><pre class='codelisting'> | |
// JavaScript // JavaScript | |
function OnGUI () { function OnGUI () { | |
if (GUI.Button (Rect (10,10,150,100), "I am a button" if (GUI.Button (Rect (10,10,150,100), "I am a button" | |
print ("You clicked the button!"); print ("You clicked the button!"); | |
} } | |
} } | |
// C# // C# | |
using UnityEngine; using UnityEngine; | |
using System.Collections; using System.Collections; | |
public class GUITest : MonoBehaviour { public class GUITest : MonoBehaviour { | |
void OnGUI () { void OnGUI () { | |
if (GUI.Button (new Rect (10,10,150,100), "I if (GUI.Button (new Rect (10,10,150,100), "I | |
print ("You clicked the button!"); print ("You clicked the button!"); | |
} } | |
} } | |
} } | |
</pre> </pre> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Although this example is very simple, there <p class='vspace'>Although this example is very simple, there | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/gui-Basics. <div class='vspace'></div><h2><a href="Components/gui-Basics. | |
<p>This section covers the fundamental concepts of UnityGUI, <p>This section covers the fundamental concepts of UnityGUI, | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/gui-Control <div class='vspace'></div><h2><a href="Components/gui-Control | |
<p>This section lists every available Control in UnityGUI, al <p>This section lists every available Control in UnityGUI, al | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/gui-Customi <div class='vspace'></div><h2><a href="Components/gui-Customi | |
<p>It is important to be able to change the appearance of the <p>It is important to be able to change the appearance of the | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/gui-Layout. <div class='vspace'></div><h2><a href="Components/gui-Layout. | |
<p>UnityGUI offers two ways to arrange your GUIs: you can man <p>UnityGUI offers two ways to arrange your GUIs: you can man | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/gui-Extendi <div class='vspace'></div><h2><a href="Components/gui-Extendi | |
<p>UnityGUI is very easy to extend with new Control types. Th <p>UnityGUI is very easy to extend with new Control types. Th | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/gui-Extendi <div class='vspace'></div><h2><a href="Components/gui-Extendi | |
<p>The GUI of the Unity editor is actually written using Unit <p>The GUI of the Unity editor is actually written using Unit | |
</p> </p> | |
</p><small>Page last updated: 2011-11-17</p> | </p><small>Page last updated: 2011-11-17</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='Networked Multiplayer'></a><h1>Networked Multipl <hr><a name='Networked Multiplayer'></a><h1>Networked Multipl | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Realtime networking is a complex field but Unity makes it <p>Realtime networking is a complex field but Unity makes it | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/net-HighLev <div class='vspace'></div><h2><a href="Components/net-HighLev | |
<p>This section outlines all the concepts involved in network <p>This section outlines all the concepts involved in network | |
</p> </p> | |
<div class='vspace'></div><h2><a href="Components/net-UnityNe <div class='vspace'></div><h2><a href="Components/net-UnityNe | |
<p>This section of the guide covers Unity's implementation of <p>This section of the guide covers Unity's implementation of | |
</p> </p> | |
<div class='vspace'></div><h3><a href="Components/net-RPCDeta <div class='vspace'></div><h3><a href="Components/net-RPCDeta | |
<p>Remote Procedure Call or RPC is a way of calling a functio <p>Remote Procedure Call or RPC is a way of calling a functio | |
</p> </p> | |
<div class='vspace'></div><h3><a href="Components/net-StateSy <div class='vspace'></div><h3><a href="Components/net-StateSy | |
<p>State Synchronization is a method of regularly updating a <p>State Synchronization is a method of regularly updating a | |
</p> </p> | |
<div class='vspace'></div><h3><a href="Components/net-Minimiz <div class='vspace'></div><h3><a href="Components/net-Minimiz | |
<p>Every choice you make about where and how to share data wi <p>Every choice you make about where and how to share data wi | |
</p> </p> | |
<div class='vspace'></div><h3><a href="Components/net-Network <div class='vspace'></div><h3><a href="Components/net-Network | |
<p>Network Views are Components you use to share data across <p>Network Views are Components you use to share data across | |
</p> </p> | |
<div class='vspace'></div><h3><a href="Components/net-Network <div class='vspace'></div><h3><a href="Components/net-Network | |
<p>A complex subject in networking is ownership of an object <p>A complex subject in networking is ownership of an object | |
</p> </p> | |
<div class='vspace'></div><h3><a href="Components/net-MasterS <div class='vspace'></div><h3><a href="Components/net-MasterS | |
<p>The Master Server is like a game lobby where servers can a <p>The Master Server is like a game lobby where servers can a | |
</p> </p> | |
</p><small>Page last updated: 2011-11-17</p> | </p><small>Page last updated: 2011-11-17</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='iphone-GettingStarted'></a><h1>iphone-GettingSta <hr><a name='iphone-GettingStarted'></a><h1>iphone-GettingSta | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Building games for devices like the iPhone and iPad requir <p>Building games for devices like the iPhone and iPad requir | |
</p> </p> | |
<div class='vspace'></div><h2>Setting Up Your Apple Developer <div class='vspace'></div><h2>Setting Up Your Apple Developer | |
<p>Before you can run Unity iOS games on the actual device, y <p>Before you can run Unity iOS games on the actual device, y | |
</p> </p> | |
<p class='vspace'><b>Note</b>: We recommend that you set up y <p class='vspace'><b>Note</b>: We recommend that you set up y | |
</p> </p> | |
<div class='vspace'></div><h2>Accessing iOS Functionality</h2 <div class='vspace'></div><h2>Accessing iOS Functionality</h2 | |
<p>Unity provides a number of scripting APIs to access the mu <p>Unity provides a number of scripting APIs to access the mu | |
</p> </p> | |
<div class='vspace'></div><h2>Exposing Native C, C++ or Objec <div class='vspace'></div><h2>Exposing Native C, C++ or Objec | |
<p>Unity allows you to call custom native functions written i <p>Unity allows you to call custom native functions written i | |
</p> </p> | |
<div class='vspace'></div><h2>Prepare Your Application for In <div class='vspace'></div><h2>Prepare Your Application for In | |
<p>The Unity iOS runtime allows you to download new content a <p>The Unity iOS runtime allows you to download new content a | |
</p> </p> | |
<div class='vspace'></div><h2>Occlusion Culling</h2> <div class='vspace'></div><h2>Occlusion Culling</h2> | |
<p>Unity supports <em>occlusion culling</em> which is useful <p>Unity supports <em>occlusion culling</em> which is useful | |
</p> </p> | |
<div class='vspace'></div><h2>Splash Screen Customization</h2 <div class='vspace'></div><h2>Splash Screen Customization</h2 | |
<p>See the <a href="Manual/MobileCustomizeSplashScreen.html"> <p>See the <a href="Manual/MobileCustomizeSplashScreen.html"> | |
</p> </p> | |
<div class='vspace'></div><h2>Troubleshooting and Reporting C <div class='vspace'></div><h2>Troubleshooting and Reporting C | |
<p>If you are experiencing crashes on the iOS device, please <p>If you are experiencing crashes on the iOS device, please | |
</p> </p> | |
<div class='vspace'></div><h2>How Unity's iOS and Desktop Tar <div class='vspace'></div><h2>How Unity's iOS and Desktop Tar | |
<h3>Statically Typed JavaScript</h3> <h3>Statically Typed JavaScript</h3> | |
<p>Dynamic typing in JavaScript is always turned off in Unity <p>Dynamic typing in JavaScript is always turned off in Unity | |
</p> </p> | |
<div class='vspace'></div><h3>MP3 Instead of Ogg Vorbis Audio <div class='vspace'></div><h3>MP3 Instead of Ogg Vorbis Audio | |
<p>For performance reasons, MP3 compression is favored on iOS <p>For performance reasons, MP3 compression is favored on iOS | |
</p> </p> | |
<div class='vspace'></div><h3>PVRTC Instead of DXT Texture Co <div class='vspace'></div><h3>PVRTC Instead of DXT Texture Co | |
<p>Unity iOS does not support DXT textures. Instead, PVRTC te <p>Unity iOS does not support DXT textures. Instead, PVRTC te | |
</p> </p> | |
<div class='vspace'></div><h3>Movie Playback</h3> <div class='vspace'></div><h3>Movie Playback</h3> | |
<p>MovieTextures are not supported on iOS. Instead, full-scr <p>MovieTextures are not supported on iOS. Instead, full-scr | |
</p> </p> | |
<div class='vspace'></div><h2>Further Reading</h2> <div class='vspace'></div><h2>Further Reading</h2> | |
<ul><li class='toclink'><a href="Manual/iphone-basic.html">Un <ul><li class='toclink'><a href="Manual/iphone-basic.html">Un | |
</li><li class='toclink'><a href="Manual/unity-remote.html">U </li><li class='toclink'><a href="Manual/unity-remote.html">U | |
</li><li class='toclink'><a href="Manual/iphone-API.html">iOS </li><li class='toclink'><a href="Manual/iphone-API.html">iOS | |
<ul><li class='toclink'><a href="Manual/Input.html#iPhoneInpu <ul><li class='toclink'><a href="Manual/Input.html#iPhoneInpu | |
</li><li class='toclink'><a href="Manual/MobileKeyboard.html" </li><li class='toclink'><a href="Manual/MobileKeyboard.html" | |
</li><li class='toclink'><a href="Manual/MobileAdvanced.html" </li><li class='toclink'><a href="Manual/MobileAdvanced.html" | |
</li><li class='toclink'><a href="Manual/MobileDotnet.html">U </li><li class='toclink'><a href="Manual/MobileDotnet.html">U | |
</li></ul></li><li class='toclink'><a href="Manual/iphone-Har </li></ul></li><li class='toclink'><a href="Manual/iphone-Har | |
</li><li class='toclink'><a href="Manual/iphone-performance.h </li><li class='toclink'><a href="Manual/iphone-performance.h | |
<ul><li class='toclink'><a href="Manual/iphone-iOS-Optimizati <ul><li class='toclink'><a href="Manual/iphone-iOS-Optimizati | |
</li><li class='toclink'><a href="Manual/iphone-InternalProfi </li><li class='toclink'><a href="Manual/iphone-InternalProfi | |
</li><li class='toclink'><a href="Manual/iphone-playerSizeOpt </li><li class='toclink'><a href="Manual/iphone-playerSizeOpt | |
</li></ul></li><li class='toclink'><a href="Manual/iphone-acc </li></ul></li><li class='toclink'><a href="Manual/iphone-acc | |
</li><li class='toclink'><a href="Manual/iphone-unsupported.h </li><li class='toclink'><a href="Manual/iphone-unsupported.h | |
</li><li class='toclink'><a href="Manual/PluginsForIOS.html"> </li><li class='toclink'><a href="Manual/PluginsForIOS.html"> | |
</li><li class='toclink'><a href="Manual/iphone-Downloadable- </li><li class='toclink'><a href="Manual/iphone-Downloadable- | |
</li><li class='toclink'><a href="Manual/MobileCustomizeSplas </li><li class='toclink'><a href="Manual/MobileCustomizeSplas | |
</li><li class='toclink'><a href="Manual/TroubleShooting.html </li><li class='toclink'><a href="Manual/TroubleShooting.html | |
</li><li class='toclink'><a href="Manual/iphone-bugreporting. </li><li class='toclink'><a href="Manual/iphone-bugreporting. | |
</li></ul> </li></ul> | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
</div> </div> | |
</p><small>Page last updated: 2012-06-06</p> | </p><small>Page last updated: 2012-06-06</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='iphone-basic'></a><h1>iphone-basic</h1> <hr><a name='iphone-basic'></a><h1>iphone-basic</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>This section covers the most common and important question <p>This section covers the most common and important question | |
</p> </p> | |
<div class='vspace'></div><h2>Prerequisites</h2> <div class='vspace'></div><h2>Prerequisites</h2> | |
<h3>I've just received iPhone Developer approval from Apple, <h3>I've just received iPhone Developer approval from Apple, | |
<p><b>A</b>: Download the SDK, get up and running on the Appl <p><b>A</b>: Download the SDK, get up and running on the Appl | |
</p> </p> | |
<div class='vspace'></div><h3>Can Unity-built games run in th <div class='vspace'></div><h3>Can Unity-built games run in th | |
<p><b>A</b>: No, but Unity iOS can build to iPad Simulator if <p><b>A</b>: No, but Unity iOS can build to iPad Simulator if | |
</p> </p> | |
<div class='vspace'></div><h2>Unity Features</h2> <div class='vspace'></div><h2>Unity Features</h2> | |
<h3>How do I work with the touch screen and accelerometer?</h <h3>How do I work with the touch screen and accelerometer?</h | |
<p><b>A</b>: In the scripting reference inside your Unity iOS <p><b>A</b>: In the scripting reference inside your Unity iOS | |
</p> </p> | |
<div class='vspace'></div><h3>My existing particle systems se <div class='vspace'></div><h3>My existing particle systems se | |
<p><b>A</b>: iOS has relatively low fillrate. If your particl <p><b>A</b>: iOS has relatively low fillrate. If your particl | |
</p> </p> | |
<div class='vspace'></div><h3>Can I make a game that uses hea <div class='vspace'></div><h3>Can I make a game that uses hea | |
<p><b>A</b>: Physics can be expensive on iOS is it requires <p><b>A</b>: Physics can be expensive on iOS is it requires | |
</p> </p> | |
<div class='vspace'></div><h3>Can I access the gallery, music <div class='vspace'></div><h3>Can I access the gallery, music | |
<p><b>A</b>: Yes - if you implement it. Unity iPhone supports <p><b>A</b>: Yes - if you implement it. Unity iPhone supports | |
</p> </p> | |
<div class='vspace'></div><h2>UnityGUI Considerations</h2> <div class='vspace'></div><h2>UnityGUI Considerations</h2> | |
<h3>What kind of performance impact will UnityGUI make on my <h3>What kind of performance impact will UnityGUI make on my | |
<p><b>A</b>: UnityGUI is fairly expensive when many controls <p><b>A</b>: UnityGUI is fairly expensive when many controls | |
</p> </p> | |
<div class='vspace'></div><h3>Any other tips for using UnityG <div class='vspace'></div><h3>Any other tips for using UnityG | |
<p><b>A</b>: Try using GUILayout as little as possible. If yo <p><b>A</b>: Try using GUILayout as little as possible. If yo | |
</p> </p> | |
</p><small>Page last updated: 2011-10-29</p> | </p><small>Page last updated: 2011-10-29</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='unity-remote'></a><h1>unity-remote</h1> <hr><a name='unity-remote'></a><h1>unity-remote</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity Remote is an application that allows you to use your <p>Unity Remote is an application that allows you to use your | |
</p> </p> | |
<div class='vspace'></div><h2>Where can I find Unity Remote?< <div class='vspace'></div><h2>Where can I find Unity Remote?< | |
<p>Unity remote is available for download from the AppStore a <p>Unity remote is available for download from the AppStore a | |
</p> </p> | |
<div class='vspace'></div><h2>How do I build Unity Remote?</h <div class='vspace'></div><h2>How do I build Unity Remote?</h | |
<p>First, download the project source code <a class='urllink' <p>First, download the project source code <a class='urllink' | |
</p> </p> | |
<p class='vspace'>Assuming you have already created the provi <p class='vspace'>Assuming you have already created the provi | |
</p> </p> | |
<p class='vspace'>Once Unity Remote is installed, make sure y <p class='vspace'>Once Unity Remote is installed, make sure y | |
</p> </p> | |
<p class='vspace'><b>Note:</b> The Unity iOS editor cannot em <p class='vspace'><b>Note:</b> The Unity iOS editor cannot em | |
</p> </p> | |
<div class='vspace'></div><h2>Xcode shows strange errors whil <div class='vspace'></div><h2>Xcode shows strange errors whil | |
<p>This indicates that the default Identifier in the Unity Re <p>This indicates that the default Identifier in the Unity Re | |
</p> </p> | |
<p class='vspace'>You will need to create an AppID with an tr <p class='vspace'>You will need to create an AppID with an tr | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>Open the Unity Remote project with XCode. F <p class='vspace'>Open the Unity Remote project with XCode. F | |
</p> </p> | |
<p class='vspace'>Next, select <span class='doc-menu'>Build-& <p class='vspace'>Next, select <span class='doc-menu'>Build-& | |
</p> </p> | |
<div class='vspace'></div><h2>I'm getting really poor graphic <div class='vspace'></div><h2>I'm getting really poor graphic | |
<p>When you use Unity Remote, the game actually runs on your <p>When you use Unity Remote, the game actually runs on your | |
</p> </p> | |
<div class='vspace'></div><h2>Unity Remote is laggy. Can I im <div class='vspace'></div><h2>Unity Remote is laggy. Can I im | |
<p>The performance of Unity Remote depends heavily on the spe <p>The performance of Unity Remote depends heavily on the spe | |
</p> </p> | |
<p class='vspace'>Turning Bluetooth off on both on your iPhon <p class='vspace'>Turning Bluetooth off on both on your iPhon | |
</p> </p> | |
<p class='vspace'>If you do not need to see the game view on <p class='vspace'>If you do not need to see the game view on | |
</p> </p> | |
<div class='vspace'></div><h2>The connection to Unity Remote <div class='vspace'></div><h2>The connection to Unity Remote | |
<p>This can be due to a problem with the installation or othe <p>This can be due to a problem with the installation or othe | |
</p> </p> | |
<div class='vspace'></div><ol><li>First of all, check if Blue <div class='vspace'></div><ol><li>First of all, check if Blue | |
</li><li>Delete the settings file located at ~/Library/Prefer </li><li>Delete the settings file located at ~/Library/Prefer | |
</li><li>Reinstall the game on your iPhone/iPad. </li><li>Reinstall the game on your iPhone/iPad. | |
</li><li>Reinstall Unity on your Mac. </li><li>Reinstall Unity on your Mac. | |
</li><li>As a last resort, performing a hard reset on the iOS </li><li>As a last resort, performing a hard reset on the iOS | |
</li></ol><p class='vspace'>If you still experience problems </li></ol><p class='vspace'>If you still experience problems | |
</p> </p> | |
<div class='vspace'></div><h2>Unity Remote doesn't see my Mac <div class='vspace'></div><h2>Unity Remote doesn't see my Mac | |
<ul><li>Check if Unity Remote and your Mac are connected to t <ul><li>Check if Unity Remote and your Mac are connected to t | |
</li><li>Check your firewall settings, router security settin </li><li>Check your firewall settings, router security settin | |
</li><li>Leave Unity Remote running, switch off your Mac's Ai </li><li>Leave Unity Remote running, switch off your Mac's Ai | |
</li><li>Restart both Unity and Unity Remote. Sometimes you a </li><li>Restart both Unity and Unity Remote. Sometimes you a | |
</li><li>Unity Remote uses the Apple Bonjour service, so chec </li><li>Unity Remote uses the Apple Bonjour service, so chec | |
</li><li>Reinstall Unity Remote from the latest Unity iOS pac </li><li>Reinstall Unity Remote from the latest Unity iOS pac | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2011-11-02</p> | </p><small>Page last updated: 2011-11-02</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='iphone-API'></a><h1>iphone-API</h1> <hr><a name='iphone-API'></a><h1>iphone-API</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>Unity iOS provides a number of new scripting APIs to acces <p>Unity iOS provides a number of new scripting APIs to acces | |
</p><table width='100%'><tr ><td align='left'><a class='urll </p><table width='100%'><tr ><td align='left'><a class='urll | |
<tr ><td align='left'><a class='urllink' href='ScriptReferen <tr ><td align='left'><a class='urllink' href='ScriptReferen | |
<tr ><td align='left'><a class='urllink' href='ScriptReferen <tr ><td align='left'><a class='urllink' href='ScriptReferen | |
<tr ><td align='left'><a class='urllink' href='ScriptReferen <tr ><td align='left'><a class='urllink' href='ScriptReferen | |
</table> </table> | |
<div class='vspace'></div><h2>Further Reading</h2> <div class='vspace'></div><h2>Further Reading</h2> | |
<ul><li class='toclink'><a href="Manual/Input.html#iPhoneInpu <ul><li class='toclink'><a href="Manual/Input.html#iPhoneInpu | |
</li><li class='toclink'><a href="Manual/MobileKeyboard.html" </li><li class='toclink'><a href="Manual/MobileKeyboard.html" | |
</li><li class='toclink'><a href="Manual/MobileAdvanced.html" </li><li class='toclink'><a href="Manual/MobileAdvanced.html" | |
</li><li class='toclink'><a href="Manual/MobileDotnet.html">U </li><li class='toclink'><a href="Manual/MobileDotnet.html">U | |
</li></ul> </li></ul> | |
</p><small>Page last updated: 2010-09-08</p> | </p><small>Page last updated: 2010-09-08</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='iphone-Input'></a><h1>iphone-Input</h1> <hr><a name='iphone-Input'></a><h1>iphone-Input</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<a class='desktopRef' id='desktopRef' href="javascript:ShowHi <a class='desktopRef' id='desktopRef' href="javascript:ShowHi | |
<div class='specific-desktop' style='display: block;' id='spe <div class='specific-desktop' style='display: block;' id='spe | |
<p class='vspace'><b>Note:</b> Keyboard, joystick and gamepad <p class='vspace'><b>Note:</b> Keyboard, joystick and gamepad | |
</p> </p> | |
<p class='vspace'>Unity supports keyboard, joystick and gamep <p class='vspace'>Unity supports keyboard, joystick and gamep | |
</p> </p> | |
<p class='vspace'>Virtual axes and buttons can be created in <p class='vspace'>Virtual axes and buttons can be created in | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>You can setup joysticks, gamepads, keyboard <p class='vspace'>You can setup joysticks, gamepads, keyboard | |
</p> </p> | |
<p class='vspace'>From scripts, all virtual axes are accessed <p class='vspace'>From scripts, all virtual axes are accessed | |
</p> </p> | |
<p class='vspace'>Every project has the following default inp <p class='vspace'>Every project has the following default inp | |
</p><ul><li><span class='doc-prop'>Horizontal</span> and <spa </p><ul><li><span class='doc-prop'>Horizontal</span> and <spa | |
</li><li><span class='doc-prop'>Fire1</span>, <span class='do </li><li><span class='doc-prop'>Fire1</span>, <span class='do | |
</li><li><span class='doc-prop'>Mouse X</span> and <span clas </li><li><span class='doc-prop'>Mouse X</span> and <span clas | |
</li><li><span class='doc-prop'>Window Shake X</span> and <sp </li><li><span class='doc-prop'>Window Shake X</span> and <sp | |
</li></ul><div class='vspace'></div><h3>Adding new Input Axes </li></ul><div class='vspace'></div><h3>Adding new Input Axes | |
<p>If you want to add new virtual axes go to the <span class= <p>If you want to add new virtual axes go to the <span class= | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p class='vspace'>You map each axis to two buttons on a joyst <p class='vspace'>You map each axis to two buttons on a joyst | |
</p> </p> | |
<div class='vspace'></div><table width='100%'><tr class='tabl <div class='vspace'></div><table width='100%'><tr class='tabl | |
<tr ><td align='left'><span class='doc-prop'>Name</span></td <tr ><td align='left'><span class='doc-prop'>Name</span></td | |
<tr ><td align='left'><span class='doc-prop'>Descriptive Nam <tr ><td align='left'><span class='doc-prop'>Descriptive Nam | |
<tr ><td align='left'><span class='doc-prop'>Descriptive Neg <tr ><td align='left'><span class='doc-prop'>Descriptive Neg | |
<tr ><td align='left'><span class='doc-prop'>Negative Button <tr ><td align='left'><span class='doc-prop'>Negative Button | |
<tr ><td align='left'><span class='doc-prop'>Positive Button <tr ><td align='left'><span class='doc-prop'>Positive Button | |
<tr ><td align='left'><span class='doc-prop'>Alt Negative Bu <tr ><td align='left'><span class='doc-prop'>Alt Negative Bu | |
<tr ><td align='left'><span class='doc-prop'>Alt Positive Bu <tr ><td align='left'><span class='doc-prop'>Alt Positive Bu | |
<tr ><td align='left'><span class='doc-prop'>Gravity</span>< <tr ><td align='left'><span class='doc-prop'>Gravity</span>< | |
<tr ><td align='left'><span class='doc-prop'>Dead</span></td <tr ><td align='left'><span class='doc-prop'>Dead</span></td | |
<tr ><td align='left'><span class='doc-prop'>Sensitivity</sp <tr ><td align='left'><span class='doc-prop'>Sensitivity</sp | |
<tr ><td align='left'><span class='doc-prop'>Snap</span></td <tr ><td align='left'><span class='doc-prop'>Snap</span></td | |
<tr ><td align='left'><span class='doc-prop'>Invert</span></ <tr ><td align='left'><span class='doc-prop'>Invert</span></ | |
<tr ><td align='left'><span class='doc-prop'>Type</span></td <tr ><td align='left'><span class='doc-prop'>Type</span></td | |
<tr ><td align='left'><span class='doc-prop'>Axis</span></td <tr ><td align='left'><span class='doc-prop'>Axis</span></td | |
<tr ><td align='left'><span class='doc-prop'>Joy Num</span>< <tr ><td align='left'><span class='doc-prop'>Joy Num</span>< | |
</table> </table> | |
<p class='vspace'>Use these settings to fine tune the look an <p class='vspace'>Use these settings to fine tune the look an | |
</p> </p> | |
<div class='vspace'></div><h3>Using Input Axes from Scripts</ <div class='vspace'></div><h3>Using Input Axes from Scripts</ | |
<p>You can query the current state from a script like this: <p>You can query the current state from a script like this: | |
</p> </p> | |
<p class='vspace'><code class='escaped'>value = Input.GetAxis <p class='vspace'><code class='escaped'>value = Input.GetAxis | |
</p> </p> | |
<p class='vspace'>An axis has a value between -1 and 1. The n <p class='vspace'>An axis has a value between -1 and 1. The n | |
This is the case for joystick input and keyboard input. This is the case for joystick input and keyboard input. | |
</p> </p> | |
<p class='vspace'>However, Mouse Delta and Window Shake Delta <p class='vspace'>However, Mouse Delta and Window Shake Delta | |
</p> </p> | |
<p class='vspace'>It is possible to create multiple axes with <p class='vspace'>It is possible to create multiple axes with | |
</p> </p> | |
<div class='vspace'></div><h3>Button Names</h3> <div class='vspace'></div><h3>Button Names</h3> | |
<p>To map a key to an axis, you have to enter the key's name <p>To map a key to an axis, you have to enter the key's name | |
</p> </p> | |
<p class='vspace'>The names of keys follow this convention: <p class='vspace'>The names of keys follow this convention: | |
</p><ul><li>Normal keys: "a", "b", "c" ... </p><ul><li>Normal keys: "a", "b", "c" ... | |
</li><li>Number keys: "1", "2", "3", ... </li><li>Number keys: "1", "2", "3", ... | |
</li><li>Arrow keys: "up", "down", "left", "right" </li><li>Arrow keys: "up", "down", "left", "right" | |
</li><li>Keypad keys: "[1]", "[2]", "[3]", "[+]", "[equals]" </li><li>Keypad keys: "[1]", "[2]", "[3]", "[+]", "[equals]" | |
</li><li>Modifier keys: "right shift", "left shift", "right c </li><li>Modifier keys: "right shift", "left shift", "right c | |
</li><li>Mouse Buttons: "mouse 0", "mouse 1", "mouse 2", ... </li><li>Mouse Buttons: "mouse 0", "mouse 1", "mouse 2", ... | |
</li><li>Joystick Buttons (from any joystick): "joystick butt </li><li>Joystick Buttons (from any joystick): "joystick butt | |
</li><li>Joystick Buttons (from a specific joystick): "joysti </li><li>Joystick Buttons (from a specific joystick): "joysti | |
</li><li>Special keys: "backspace", "tab", "return", "escape" </li><li>Special keys: "backspace", "tab", "return", "escape" | |
</li><li>Function keys: "f1", "f2", "f3", ... </li><li>Function keys: "f1", "f2", "f3", ... | |
</li></ul><p class='vspace'>The names used to identify the ke </li></ul><p class='vspace'>The names used to identify the ke | |
</p> </p> | |
<p class='vspace'><code class='escaped'>value = Input.GetKey <p class='vspace'><code class='escaped'>value = Input.GetKey | |
</p></div> </p></div> | |
<div class='vspace'></div><h1>Mobile Input</h1> <div class='vspace'></div><h1>Mobile Input</h1> | |
<p>On iOS and Android, the <a class='urllink' href='ScriptRef <p>On iOS and Android, the <a class='urllink' href='ScriptRef | |
</p> </p> | |
<p class='vspace'>Access to keyboard on mobile devices is pro <p class='vspace'>Access to keyboard on mobile devices is pro | |
</p><h2>Multi-Touch Screen</h2> </p><h2>Multi-Touch Screen</h2> | |
<p>The iPhone and iPod Touch devices are capable of tracking <p>The iPhone and iPod Touch devices are capable of tracking | |
</p> </p> | |
<div class='vspace'></div><div class='specific-android' style <div class='vspace'></div><div class='specific-android' style | |
<p>Android devices don't have a unified limit on how many fin <p>Android devices don't have a unified limit on how many fin | |
</p></div> </p></div> | |
<p class='vspace'>Each finger touch is represented by an <a c <p class='vspace'>Each finger touch is represented by an <a c | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>fingerId</span> <tr ><td align='left'><span class='doc-prop'>fingerId</span> | |
<tr ><td align='left'><span class='doc-prop'>position</span> <tr ><td align='left'><span class='doc-prop'>position</span> | |
<tr ><td align='left'><span class='doc-prop'>deltaPosition</ <tr ><td align='left'><span class='doc-prop'>deltaPosition</ | |
<tr ><td align='left'><span class='doc-prop'>deltaTime</span <tr ><td align='left'><span class='doc-prop'>deltaTime</span | |
<tr ><td align='left'><span class='doc-prop'>tapCount</span> <tr ><td align='left'><span class='doc-prop'>tapCount</span> | |
<tr ><td align='left'><span class='doc-prop'>phase</span></t <tr ><td align='left'><span class='doc-prop'>phase</span></t | |
</table> </table> | |
<p class='vspace'>Phase can be one of the following: <p class='vspace'>Phase can be one of the following: | |
</p><table ><tr ><td align='left'><span class='doc-prop'>Beg </p><table ><tr ><td align='left'><span class='doc-prop'>Beg | |
<tr ><td align='left'><span class='doc-prop'>Moved</span></t <tr ><td align='left'><span class='doc-prop'>Moved</span></t | |
<tr ><td align='left'><span class='doc-prop'>Stationary</spa <tr ><td align='left'><span class='doc-prop'>Stationary</spa | |
<tr ><td align='left'><span class='doc-prop'>Ended</span></t <tr ><td align='left'><span class='doc-prop'>Ended</span></t | |
<tr ><td align='left'><span class='doc-prop'>Canceled</span> <tr ><td align='left'><span class='doc-prop'>Canceled</span> | |
</table> </table> | |
<p class='vspace'>Following is an example script which will s <p class='vspace'>Following is an example script which will s | |
</p><pre class='codelisting'> </p><pre class='codelisting'> | |
var particle : GameObject; var particle : GameObject; | |
function Update () { function Update () { | |
for (var touch : Touch in Input.touches) { for (var touch : Touch in Input.touches) { | |
if (touch.phase == TouchPhase.Began) { if (touch.phase == TouchPhase.Began) { | |
// Construct a ray from the current t // Construct a ray from the current t | |
var ray = Camera.main.ScreenPointToRa var ray = Camera.main.ScreenPointToRa | |
if (Physics.Raycast (ray)) { if (Physics.Raycast (ray)) { | |
// Create a particle if hit // Create a particle if hit | |
Instantiate (particle, transf Instantiate (particle, transf | |
} } | |
} } | |
} } | |
} } | |
</pre> </pre> | |
<div class='vspace'></div><h3>Mouse Simulation</h3> <div class='vspace'></div><h3>Mouse Simulation</h3> | |
<p>On top of native touch support Unity iOS/Android provides <p>On top of native touch support Unity iOS/Android provides | |
</p> </p> | |
<div class='vspace'></div><h2>Device Orientation</h2> <div class='vspace'></div><h2>Device Orientation</h2> | |
<p>Unity iOS/Android allows you to get discrete description o <p>Unity iOS/Android allows you to get discrete description o | |
</p> </p> | |
<p class='vspace'>You can retrieve device orientation by acce <p class='vspace'>You can retrieve device orientation by acce | |
</p><table ><tr ><td align='left'><span class='doc-prop'>Unk </p><table ><tr ><td align='left'><span class='doc-prop'>Unk | |
<tr ><td align='left'><span class='doc-prop'>Portrait</span> <tr ><td align='left'><span class='doc-prop'>Portrait</span> | |
<tr ><td align='left'><span class='doc-prop'>PortraitUpsideD <tr ><td align='left'><span class='doc-prop'>PortraitUpsideD | |
<tr ><td align='left'><span class='doc-prop'>LandscapeLeft</ <tr ><td align='left'><span class='doc-prop'>LandscapeLeft</ | |
<tr ><td align='left'><span class='doc-prop'>LandscapeRight< <tr ><td align='left'><span class='doc-prop'>LandscapeRight< | |
<tr ><td align='left'><span class='doc-prop'>FaceUp</span></ <tr ><td align='left'><span class='doc-prop'>FaceUp</span></ | |
<tr ><td align='left'><span class='doc-prop'>FaceDown</span> <tr ><td align='left'><span class='doc-prop'>FaceDown</span> | |
</table> </table> | |
<div class='vspace'></div><h2>Accelerometer</h2> <div class='vspace'></div><h2>Accelerometer</h2> | |
<p>As the mobile device moves, a built-in accelerometer repor <p>As the mobile device moves, a built-in accelerometer repor | |
changes along the three primary axes in three-dimensional spa changes along the three primary axes in three-dimensional spa | |
along each axis is reported directly by the hardware as G-for along each axis is reported directly by the hardware as G-for | |
of 1.0 represents a load of about +1g along a given axis whil of 1.0 represents a load of about +1g along a given axis whil | |
represents -1g. If you hold the device upright (with the home represents -1g. If you hold the device upright (with the home | |
bottom) in front of you, the X axis is positive along the rig bottom) in front of you, the X axis is positive along the rig | |
positive directly up, and the Z axis is positive pointing tow positive directly up, and the Z axis is positive pointing tow | |
</p> </p> | |
<p class='vspace'>You can retrieve the accelerometer value by <p class='vspace'>You can retrieve the accelerometer value by | |
</p> </p> | |
<p class='vspace'>The following is an example script which wi <p class='vspace'>The following is an example script which wi | |
</p><pre class='codelisting'> </p><pre class='codelisting'> | |
var speed = 10.0; var speed = 10.0; | |
function Update () { function Update () { | |
var dir : Vector3 = Vector3.zero; var dir : Vector3 = Vector3.zero; | |
// we assume that the device is held parallel to the // we assume that the device is held parallel to the | |
// and the Home button is in the right hand // and the Home button is in the right hand | |
// remap the device acceleration axis to game coordin // remap the device acceleration axis to game coordin | |
// 1) XY plane of the device is mapped onto XZ plane // 1) XY plane of the device is mapped onto XZ plane | |
// 2) rotated 90 degrees around Y axis // 2) rotated 90 degrees around Y axis | |
dir.x = -Input.acceleration.y; dir.x = -Input.acceleration.y; | |
dir.z = Input.acceleration.x; dir.z = Input.acceleration.x; | |
// clamp acceleration vector to the unit sphere // clamp acceleration vector to the unit sphere | |
if (dir.sqrMagnitude > 1) if (dir.sqrMagnitude > 1) | |
dir.Normalize(); dir.Normalize(); | |
// Make it move 10 meters per second instead of 10 me // Make it move 10 meters per second instead of 10 me | |
dir *= Time.deltaTime; dir *= Time.deltaTime; | |
// Move object // Move object | |
transform.Translate (dir * speed); transform.Translate (dir * speed); | |
} } | |
</pre> </pre> | |
<div class='vspace'></div><h3>Low-Pass Filter</h3> <div class='vspace'></div><h3>Low-Pass Filter</h3> | |
<p>Accelerometer readings can be jerky and noisy. Applying lo <p>Accelerometer readings can be jerky and noisy. Applying lo | |
</p> </p> | |
<p class='vspace'>The following script shows you how to apply <p class='vspace'>The following script shows you how to apply | |
</p><pre class='codelisting'> </p><pre class='codelisting'> | |
var AccelerometerUpdateInterval : float = 1.0 / 60.0; var AccelerometerUpdateInterval : float = 1.0 / 60.0; | |
var LowPassKernelWidthInSeconds : float = 1.0; var LowPassKernelWidthInSeconds : float = 1.0; | |
private var LowPassFilterFactor : float = AccelerometerUpdate private var LowPassFilterFactor : float = AccelerometerUpdate | |
private var lowPassValue : Vector3 = Vector3.zero; private var lowPassValue : Vector3 = Vector3.zero; | |
function Start () { function Start () { | |
lowPassValue = Input.acceleration; lowPassValue = Input.acceleration; | |
} } | |
function LowPassFilterAccelerometer() : Vector3 { function LowPassFilterAccelerometer() : Vector3 { | |
lowPassValue = Mathf.Lerp(lowPassValue, Input.acceler lowPassValue = Mathf.Lerp(lowPassValue, Input.acceler | |
return lowPassValue; return lowPassValue; | |
} } | |
</pre> </pre> | |
<p class='vspace'>The greater the value of <code>LowPassKerne <p class='vspace'>The greater the value of <code>LowPassKerne | |
</p> </p> | |
<div class='vspace'></div><h3>I'd like as much precision as p <div class='vspace'></div><h3>I'd like as much precision as p | |
<p>Reading the <a class='urllink' href='ScriptReference/Input <p>Reading the <a class='urllink' href='ScriptReference/Input | |
</p> </p> | |
<p class='vspace'>You can access all measurements executed by <p class='vspace'>You can access all measurements executed by | |
</p> </p> | |
<div class='vspace'></div><pre class='codelisting'> <div class='vspace'></div><pre class='codelisting'> | |
var period : float = 0.0; var period : float = 0.0; | |
var acc : Vector3 = Vector3.zero; var acc : Vector3 = Vector3.zero; | |
for (var evnt : iPhoneAccelerationEvent in iPhoneInput.accel for (var evnt : iPhoneAccelerationEvent in iPhoneInput.accel | |
acc += evnt.acceleration * evnt.deltaTime; acc += evnt.acceleration * evnt.deltaTime; | |
period += evnt.deltaTime; period += evnt.deltaTime; | |
} } | |
if (period > 0) if (period > 0) | |
acc *= 1.0/period; acc *= 1.0/period; | |
return acc; return acc; | |
</pre> </pre> | |
<div class='vspace'></div><h2>Further Reading</h2> <div class='vspace'></div><h2>Further Reading</h2> | |
<p>The Unity mobile input API is originally based on Apple's <p>The Unity mobile input API is originally based on Apple's | |
You can find the Apple input API documentation here: You can find the Apple input API documentation here: | |
</p><ul><li><a class='urllink' href='file:///Library/Develope </p><ul><li><a class='urllink' href='file:///Library/Develope | |
</li><li><a class='urllink' href='file:///Library/Developer/S </li><li><a class='urllink' href='file:///Library/Developer/S | |
</li></ul><p class='vspace'><b>Note:</b> The above links refe </li></ul><p class='vspace'><b>Note:</b> The above links refe | |
</p> </p> | |
<div class='vspace'></div><a class='iosRef' id='iosRef' href= <div class='vspace'></div><a class='iosRef' id='iosRef' href= | |
<p><a name='iPhoneInput' id='iPhoneInput'></a> <p><a name='iPhoneInput' id='iPhoneInput'></a> | |
</p><div class='specific-ios' style='display: block;' id='spe </p><div class='specific-ios' style='display: block;' id='spe | |
<div class='vspace'></div><h2>Device geographical location</h <div class='vspace'></div><h2>Device geographical location</h | |
<p>Device geographical location can be obtained via the <a cl <p>Device geographical location can be obtained via the <a cl | |
</p></div> </p></div> | |
</p><small>Page last updated: 2012-06-28</p> | </p><small>Page last updated: 2012-06-28</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='iOS-Keyboard'></a><h1>iOS-Keyboard</h1> <hr><a name='iOS-Keyboard'></a><h1>iOS-Keyboard</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p>In most cases, Unity will handle keyboard input automatica <p>In most cases, Unity will handle keyboard input automatica | |
</p> </p> | |
<div class='vspace'></div><a class='iosRef' id='iosRef' href= <div class='vspace'></div><a class='iosRef' id='iosRef' href= | |
<p><a name='iOS' id='iOS'></a> <p><a name='iOS' id='iOS'></a> | |
</p><div class='specific-ios' style='display: block;' id='spe </p><div class='specific-ios' style='display: block;' id='spe | |
<h2>Using the Keyboard</h2> <h2>Using the Keyboard</h2> | |
<h3>GUI Elements</h3> <h3>GUI Elements</h3> | |
<p>The keyboard will appear automatically when a user taps on <p>The keyboard will appear automatically when a user taps on | |
</p> </p> | |
<div class='vspace'></div><h3>Manual Keyboard Handling</h3> <div class='vspace'></div><h3>Manual Keyboard Handling</h3> | |
<p>Use the <span class='doc-prop'>iPhoneKeyboard.Open</span> <p>Use the <span class='doc-prop'>iPhoneKeyboard.Open</span> | |
</p> </p> | |
<div class='vspace'></div><h2>Keyboard Type Summary</h2> <div class='vspace'></div><h2>Keyboard Type Summary</h2> | |
<p>The Keyboard supports the following types: <p>The Keyboard supports the following types: | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT <tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT | |
<tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT <tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT | |
<tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT <tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT | |
<tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT <tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT | |
<tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT <tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT | |
<tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT <tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT | |
<tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT <tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT | |
<tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT <tr ><td align='left'><span class='doc-prop'>iPhoneKeyboardT | |
</table> </table> | |
<div class='vspace'></div><h2>Text Preview</h2> <div class='vspace'></div><h2>Text Preview</h2> | |
<p>By default, an edit box will be created and placed on top <p>By default, an edit box will be created and placed on top | |
</p> </p> | |
<div class='vspace'></div><h2>Keyboard Orientation</h2> <div class='vspace'></div><h2>Keyboard Orientation</h2> | |
<p>By default, the keyboard automatically follows the device <p>By default, the keyboard automatically follows the device | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>autorotateToPor <tr ><td align='left'><span class='doc-prop'>autorotateToPor | |
<tr ><td align='left'><span class='doc-prop'>autorotateToPor <tr ><td align='left'><span class='doc-prop'>autorotateToPor | |
<tr ><td align='left'><span class='doc-prop'>autorotateToLan <tr ><td align='left'><span class='doc-prop'>autorotateToLan | |
<tr ><td align='left'><span class='doc-prop'>autorotateToLan <tr ><td align='left'><span class='doc-prop'>autorotateToLan | |
</table> </table> | |
<div class='vspace'></div><h2>Visibility and Keyboard Size</h <div class='vspace'></div><h2>Visibility and Keyboard Size</h | |
<p>There are three keyboard properties in <a class='urllink' <p>There are three keyboard properties in <a class='urllink' | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'>visible</span>< <tr ><td align='left'><span class='doc-prop'>visible</span>< | |
<tr ><td align='left'><span class='doc-prop'>area</span></td <tr ><td align='left'><span class='doc-prop'>area</span></td | |
<tr ><td align='left'><span class='doc-prop'>active</span></ <tr ><td align='left'><span class='doc-prop'>active</span></ | |
</table> </table> | |
<p class='vspace'>Note that <span class='doc-prop'>iPhoneKeyb <p class='vspace'>Note that <span class='doc-prop'>iPhoneKeyb | |
</p> </p> | |
<div class='vspace'></div><ul><li><span class='doc-prop'>iPho <div class='vspace'></div><ul><li><span class='doc-prop'>iPho | |
</li><li>Keyboard slides out into the screen. All properties </li><li>Keyboard slides out into the screen. All properties | |
</li><li>Keyboard stops sliding. <span class='doc-prop'>iPhon </li><li>Keyboard stops sliding. <span class='doc-prop'>iPhon | |
</li></ul><div class='vspace'></div><h2>Secure Text Input</h2 </li></ul><div class='vspace'></div><h2>Secure Text Input</h2 | |
<p>It is possible to configure the keyboard to hide symbols w <p>It is possible to configure the keyboard to hide symbols w | |
</p><pre class='codelisting'> </p><pre class='codelisting'> | |
iPhoneKeyboard.Open("", iPhoneKeyboardType.Default, false, fa iPhoneKeyboard.Open("", iPhoneKeyboardType.Default, false, fa | |
</pre> </pre> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Hiding text while typing</em> <p><em>Hiding text while typing</em> | |
</p> </p> | |
<div class='vspace'></div><h2>Alert keyboard</h2> <div class='vspace'></div><h2>Alert keyboard</h2> | |
<p>To display the keyboard with a black semi-transparent back <p>To display the keyboard with a black semi-transparent back | |
</p><pre class='codelisting'> </p><pre class='codelisting'> | |
iPhoneKeyboard.Open("", iPhoneKeyboardType.Default, false, fa iPhoneKeyboard.Open("", iPhoneKeyboardType.Default, false, fa | |
</pre> </pre> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Classic keyboard</em> <p><em>Classic keyboard</em> | |
</p> </p> | |
<div class='vspace'></div><div><img class='figure' src='Image <div class='vspace'></div><div><img class='figure' src='Image | |
<p><em>Alert keyboard</em> <p><em>Alert keyboard</em> | |
</p> </p> | |
<div class='vspace'></div></div> <div class='vspace'></div></div> | |
<div class='vspace'></div><a class='androidRef' id='androidRe <div class='vspace'></div><a class='androidRef' id='androidRe | |
<p><a name='Android' id='Android'></a> <p><a name='Android' id='Android'></a> | |
</p><div class='specific-android' style='display: block;' id= </p><div class='specific-android' style='display: block;' id= | |
<p>Unity Android reuses the iOS API to display system keyboar <p>Unity Android reuses the iOS API to display system keyboar | |
</p><ul><li><span class='doc-prop'>iPhoneKeyboard.hideInput</ </p><ul><li><span class='doc-prop'>iPhoneKeyboard.hideInput</ | |
</li><li><span class='doc-prop'>iPhoneKeyboard.area</span> </li><li><span class='doc-prop'>iPhoneKeyboard.area</span> | |
</li></ul><p class='vspace'>Please also note that the layout </li></ul><p class='vspace'>Please also note that the layout | |
</p></div> </p></div> | |
</p><small>Page last updated: 2011-11-02</p> | </p><small>Page last updated: 2011-11-02</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='iOS-Advanced'></a><h1>iOS-Advanced</h1> <hr><a name='iOS-Advanced'></a><h1>iOS-Advanced</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p><a name='iOS' id='iOS'></a> <p><a name='iOS' id='iOS'></a> | |
</p><a class='iosRef' id='iosRef' href="javascript:ShowHideDi </p><a class='iosRef' id='iosRef' href="javascript:ShowHideDi | |
<div class='specific-ios' style='display: block;' id='specifi <div class='specific-ios' style='display: block;' id='specifi | |
<h1>Advanced iOS scripting</h1> <h1>Advanced iOS scripting</h1> | |
<h2>Determining Device Generation</h2> <h2>Determining Device Generation</h2> | |
<p>Different device generations support different functionali <p>Different device generations support different functionali | |
</p> </p> | |
<p class='vspace'>You can find the device generation from the <p class='vspace'>You can find the device generation from the | |
</p><ul><li><span class='doc-prop'>iPhone</span> </p><ul><li><span class='doc-prop'>iPhone</span> | |
</li><li><span class='doc-prop'>iPhone3G</span> </li><li><span class='doc-prop'>iPhone3G</span> | |
</li><li><span class='doc-prop'>iPhone3GS</span> </li><li><span class='doc-prop'>iPhone3GS</span> | |
</li><li><span class='doc-prop'>iPhone4</span> </li><li><span class='doc-prop'>iPhone4</span> | |
</li><li><span class='doc-prop'>iPodTouch1Gen</span> </li><li><span class='doc-prop'>iPodTouch1Gen</span> | |
</li><li><span class='doc-prop'>iPodTouch2Gen</span> </li><li><span class='doc-prop'>iPodTouch2Gen</span> | |
</li><li><span class='doc-prop'>iPodTouch3Gen</span> </li><li><span class='doc-prop'>iPodTouch3Gen</span> | |
</li><li><span class='doc-prop'>iPodTouch4Gen</span> </li><li><span class='doc-prop'>iPodTouch4Gen</span> | |
</li><li><span class='doc-prop'>iPad1Gen</span> </li><li><span class='doc-prop'>iPad1Gen</span> | |
</li></ul><p class='vspace'>You can find more information abo </li></ul><p class='vspace'>You can find more information abo | |
</p> </p> | |
<div class='vspace'></div><h2>Device Properties</h2> <div class='vspace'></div><h2>Device Properties</h2> | |
<p>There are a number of device-specific properties that you <p>There are a number of device-specific properties that you | |
</p><table width='100%'><tr class='tableheader'><td class='p </p><table width='100%'><tr class='tableheader'><td class='p | |
<tr ><td align='left'><span class='doc-prop'><a class='urlli <tr ><td align='left'><span class='doc-prop'><a class='urlli | |
<tr ><td align='left'><span class='doc-prop'><a class='urlli <tr ><td align='left'><span class='doc-prop'><a class='urlli | |
<tr ><td align='left'><span class='doc-prop'><a class='urlli <tr ><td align='left'><span class='doc-prop'><a class='urlli | |
<tr ><td align='left'><span class='doc-prop'><a class='urlli <tr ><td align='left'><span class='doc-prop'><a class='urlli | |
</table> </table> | |
<div class='vspace'></div><h2>Anti-Piracy Check</h2> <div class='vspace'></div><h2>Anti-Piracy Check</h2> | |
<p>Pirates will often hack an application from the AppStore ( <p>Pirates will often hack an application from the AppStore ( | |
</p> </p> | |
<p class='vspace'>You can check if your application is genuin <p class='vspace'>You can check if your application is genuin | |
</p> </p> | |
<p class='vspace'><b>Note:</b> accessing the <a class='urllin <p class='vspace'><b>Note:</b> accessing the <a class='urllin | |
</p> </p> | |
<div class='vspace'></div><h2>Vibration Support</h2> <div class='vspace'></div><h2>Vibration Support</h2> | |
<p>You can trigger a vibration by calling <a class='urllink' <p>You can trigger a vibration by calling <a class='urllink' | |
</p> </p> | |
<div class='vspace'></div></div> <div class='vspace'></div></div> | |
<p class='vspace'><a name='Android' id='Android'></a> <p class='vspace'><a name='Android' id='Android'></a> | |
</p><a class='androidRef' id='androidRef' href="javascript:Sh </p><a class='androidRef' id='androidRef' href="javascript:Sh | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<h1>Advanced Android scripting</h1> <h1>Advanced Android scripting</h1> | |
<h2>Determining Device Generation</h2> <h2>Determining Device Generation</h2> | |
<p>Different Android devices support different functionality <p>Different Android devices support different functionality | |
</p> </p> | |
<p class='vspace'><b>Note:</b> Android Marketplace does some <p class='vspace'><b>Note:</b> Android Marketplace does some | |
</p> </p> | |
<div class='vspace'></div><h2>Device Properties</h2> <div class='vspace'></div><h2>Device Properties</h2> | |
<table ><tr class='tableheader'><td class='prop'></td><td cl <table ><tr class='tableheader'><td class='prop'></td><td cl | |
<tr ><td align='left'><span class='doc-prop'><a class='urlli <tr ><td align='left'><span class='doc-prop'><a class='urlli | |
<tr ><td align='left'><span class='doc-prop'><a class='urlli <tr ><td align='left'><span class='doc-prop'><a class='urlli | |
<tr ><td align='left'><span class='doc-prop'><a class='urlli <tr ><td align='left'><span class='doc-prop'><a class='urlli | |
<tr ><td align='left'><span class='doc-prop'><a class='urlli <tr ><td align='left'><span class='doc-prop'><a class='urlli | |
</table> </table> | |
<div class='vspace'></div><h2>Anti-Piracy Check</h2> <div class='vspace'></div><h2>Anti-Piracy Check</h2> | |
<p>Pirates will often hack an application (by removing Apple <p>Pirates will often hack an application (by removing Apple | |
</p> </p> | |
<p class='vspace'>You can check if your application is genuin <p class='vspace'>You can check if your application is genuin | |
</p> </p> | |
<p class='vspace'><b>Note:</b> <a class='urllink' href='Scrip <p class='vspace'><b>Note:</b> <a class='urllink' href='Scrip | |
</p> </p> | |
<div class='vspace'></div><h2>Vibration Support</h2> <div class='vspace'></div><h2>Vibration Support</h2> | |
<p>You can trigger a vibration by calling <a class='urllink' <p>You can trigger a vibration by calling <a class='urllink' | |
</p> </p> | |
<div class='vspace'></div></div> <div class='vspace'></div></div> | |
</p><small>Page last updated: 2012-07-11</p> | </p><small>Page last updated: 2012-07-11</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='iOS-DotNet'></a><h1>iOS-DotNet</h1> <hr><a name='iOS-DotNet'></a><h1>iOS-DotNet</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<p><a name='iOS' id='iOS'></a> <p><a name='iOS' id='iOS'></a> | |
</p><a class='iosRef' id='iosRef' href="javascript:ShowHideDi </p><a class='iosRef' id='iosRef' href="javascript:ShowHideDi | |
<div class='specific-ios' style='display: block;' id='specifi <div class='specific-ios' style='display: block;' id='specifi | |
<p>Now Unity iOS supports two .NET API compatibility levels: <p>Now Unity iOS supports two .NET API compatibility levels: | |
</p> </p> | |
<div class='vspace'></div><h2>.NET API 2.0</h2> <div class='vspace'></div><h2>.NET API 2.0</h2> | |
<p>Unity supports the <span class='doc-prop'>.NET 2.0</span> <p>Unity supports the <span class='doc-prop'>.NET 2.0</span> | |
</p> </p> | |
<p class='vspace'><b>Note:</b> Unity iOS does not support nam <p class='vspace'><b>Note:</b> Unity iOS does not support nam | |
</p> </p> | |
<div class='vspace'></div><h2>.NET 2.0 Subset </h2> <div class='vspace'></div><h2>.NET 2.0 Subset </h2> | |
<p>Unity also supports the <span class='doc-prop'>.NET 2.0 Su <p>Unity also supports the <span class='doc-prop'>.NET 2.0 Su | |
</p> </p> | |
<div class='vspace'></div></div> <div class='vspace'></div></div> | |
<p><a name='Android' id='Android'></a> <p><a name='Android' id='Android'></a> | |
</p><a class='androidRef' id='androidRef' href="javascript:Sh </p><a class='androidRef' id='androidRef' href="javascript:Sh | |
<div class='specific-android' style='display: block;' id='spe <div class='specific-android' style='display: block;' id='spe | |
<p>Unity Android supports two .NET API compatibility levels: <p>Unity Android supports two .NET API compatibility levels: | |
</p> </p> | |
<div class='vspace'></div><h2>.NET API 2.0</h2> <div class='vspace'></div><h2>.NET API 2.0</h2> | |
<p>Unity supports the <span class='doc-prop'>.NET 2.0</span> <p>Unity supports the <span class='doc-prop'>.NET 2.0</span> | |
</p> </p> | |
<p class='vspace'><b>Note:</b> Unity Android does not support <p class='vspace'><b>Note:</b> Unity Android does not support | |
</p> </p> | |
<div class='vspace'></div><h2>.NET 2.0 Subset </h2> <div class='vspace'></div><h2>.NET 2.0 Subset </h2> | |
<p>Unity also supports the <span class='doc-prop'>.NET 2.0 Su <p>Unity also supports the <span class='doc-prop'>.NET 2.0 Su | |
</p></div> </p></div> | |
</p><small>Page last updated: 2012-07-11</p> | </p><small>Page last updated: 2012-07-11</p><br/> | |
<script type="text/javascript"> < | |
< | |
< | |
var allHTMLTags = new Array(); < | |
document.divs = new Array(); < | |
< | |
function getElementByClass(theClass) { < | |
< | |
var allHTMLTags=document.getElementsByTagName("*" < | |
< | |
for (var i=0; i<allHTMLTags.length; i++) { < | |
< | |
if (allHTMLTags[i].className==theClass) { < | |
return true; < | |
} < | |
} < | |
return false; < | |
} < | |
< | |
function ShowHideDiv(containerName, className, content){ < | |
var container = document.getElementById(containerName < | |
if(container == null) < | |
return; < | |
if(content == '') {//In case there are no divs in the < | |
if(containerName == 'desktopRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'iosRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
if(containerName == 'androidRef') { < | |
if(container.innerHTML == "<img src=\ < | |
container.innerHTML = "<img s < | |
SetCookie(containerName, 'set < | |
} else { < | |
container.innerHTML = "<img s < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
} else { < | |
if(container.innerHTML == "<h1><img src=\"../ < | |
container.innerHTML = "<h1><img src=\"../Imag < | |
SetCookie(containerName, 'set', 30); < | |
} else { < | |
container.innerHTML = "<h1><img src=\ < | |
UnSetCookie(containerName); < | |
} < | |
} < | |
for(var i = 0; i < document.divs.length; i++) { < | |
var divClassName = document.divs[i]; < | |
var matched = false; < | |
if(divClassName.className == className) < | |
matched = true; < | |
if(matched) { < | |
< | |
if(divClassName != null) { < | |
if (divClassName.style.displa < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
UnSetCookie(container < | |
} else { < | |
divClassName.style.di < | |
if(content == '') { < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
if(className < | |
conta < | |
} else { < | |
container.inn < | |
} < | |
SetCookie(containerNa < | |
} < | |
} < | |
} < | |
} < | |
} < | |
function UnSetCookie(cn) { < | |
SetCookie(cn,'',30); < | |
} < | |
< | |
function GetCookie(cName) { < | |
if (document.cookie.length > 0) { < | |
cStart = document.cookie.indexOf(cName + "="); < | |
if(cStart != -1) { < | |
cStart = cStart + cName.length + 1; < | |
cEnd = document.cookie.indexOf(";", cStart); < | |
if (cEnd == -1) { < | |
cEnd = document.cookie.length; < | |
} < | |
return unescape(document.cookie.substring(cSt < | |
} < | |
} < | |
return ""; < | |
} < | |
< | |
function SetCookie(cName, value, expireDays) { < | |
var exDate = new Date(); < | |
exDate.setDate(exDate.getDate()+expireDays); < | |
document.cookie = cName + "=" + escape(value) + ((exp < | |
} < | |
< | |
function DocLoaded() { < | |
document.divs = document.getElementsByTagName('div'); < | |
var prefDesktop = GetCookie('desktopRef'); < | |
var prefiOS = GetCookie('iosRef'); < | |
var prefAndroid = GetCookie('androidRef'); < | |
var firstTime = GetCookie('FT'); < | |
if (firstTime == null || firstTime == "" ) { < | |
SetCookie('FT', 'no', 30); < | |
SetCookie('desktopRef', 'set', 30) < | |
} else if (prefDesktop == null || prefDesktop =="") { < | |
if(getElementByClass('desktopRefIMG')) { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} else { < | |
ShowHideDiv('desktopRef','specific-desktop',' < | |
} < | |
} < | |
if (prefiOS == null || prefiOS =="") { < | |
if(getElementByClass('iosRefIMG')) { < | |
ShowHideDiv('iosRef','specific-ios',''); < | |
} else { < | |
ShowHideDiv('iosRef','specific-ios','iOS'); < | |
} < | |
} < | |
if (prefAndroid == null || prefAndroid =="") { < | |
if(getElementByClass('androidRefIMG')) { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} else { < | |
ShowHideDiv('androidRef','specific-android',' < | |
} < | |
} < | |
} < | |
</script> < | |
<br/> < | |
<hr><a name='iphone-Hardware'></a><h1>iphone-Hardware</h1> <hr><a name='iphone-Hardware'></a><h1>iphone-Hardware</h1> | |
> <script src="Images/showhide.js" type="text/javascript">< | |
> | |
<h2>Hardware models</h2> <h2>Hardware models</h2> | |
<p>The followin |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment