From e8dd5d4fd406e6e6b710cbe85309f6870bccc37a Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 3 Nov 2019 18:31:04 -0500 Subject: Remove everything --- .../Packages/Lean/Localization/DOCUMENTATION.html | 383 --------------------- 1 file changed, 383 deletions(-) delete mode 100644 Assets/Packages/Lean/Localization/DOCUMENTATION.html (limited to 'Assets/Packages/Lean/Localization/DOCUMENTATION.html') diff --git a/Assets/Packages/Lean/Localization/DOCUMENTATION.html b/Assets/Packages/Lean/Localization/DOCUMENTATION.html deleted file mode 100644 index c69d598..0000000 --- a/Assets/Packages/Lean/Localization/DOCUMENTATION.html +++ /dev/null @@ -1,383 +0,0 @@ - - - - -Lean Localization Documentation - - - -
- -

Lean Localization

-
-
-

Thank you for using Lean Localization ❤️

-

If you haven't already, please consider writing a review. They really help me out!

If you have any questions, then feel free to send me an E-Mail, or Private Message.

I'm also available for freelance work if you need help with your projects.

-

-

How do I upgrade?

-

First, make sure you back up your project files.

Next, install the latest version.

If for some reason the latest updates breaks your project (e.g. errors in the console), then try deleting the root folder for this asset, and reinstalling it.

If it still doesn't work then go back to your previous version, and let me know what the errors are, so I can fix it.

-

-
-

What is Lean Localization?

-

Lean Localization is a lightweight localization asset, allowing you to easily add language-specific text, images, and much more.

-

-
-

How do I use it?

-

-
-

Step 1 - Add Lean Localization

- -

First you need to add the LeanLocalization component to your scene:

Method 1 From your menu bar, select GameObject > Lean > Localization.
Method 2 Right click inside the Hierarchy window, and go to Lean > Localization.
Method 3 Create a new GameObject, and add the component Lean > Localization.

Your Hierarchy window should now have a new LeanLocalization GameObject added, and this should be automatically selected for you.

- -

-
-

Step 2 - Add Languages

- -

Inside the LeanLocalization component, click the Languages > Add button. Do this once for each language you want to support in your project.

NOTE: If you want to add a language not in this list, then select the Other... language, and rename it in the language list below.
-

-
-

Step 3 - Add Translations

- -

To add a translation, simply type the name of your phrase into the Translations search box, and click the Translations > Add button.

Your new phrase will automatically be added as a child to your LeanLocalization component.

-

-
-

Step 4 - Add Translations

- -

To add a translation, select your LeanPhrase component, and click the Create button next to the language you want.

Inside the phrase translation you can see two settings:

Text - Allows you to set the translated text for that phrase.

Object - Allows you to set the translated object for that phrase (e.g. Texture, Prefab, Sound).

NOTE: If you want to set a Sprite as the translated Object, make sure you expand your texture and drag and drop the sprite in, otherwise you will copy the Texture2D.
-

-
-

Step 5 - Add Localization Components

- -

Finally, you need to add a localization component to your scene.

EXAMPLE: If you want to translate UI Text, then you can add the LeanLocalizedText component to your GameObject that has the Text component.
EXAMPLE: If you want to translate a SpriteRenderer's sprite, then you can add the LeanLocalizedSpriteRenderer component to your GameObject that has the SpriteRenderer component.

Once added, you will see the Phrase Path setting, which you can set the phrase you want to use.

You can also click the List button to quickly see what's available.

-

-
-

Step 6 - Done!

-

That's it, your game will now automatically update based on your translations!

-

-
-

How do I change language?

-

There are multiple ways to do this.

-

-
-

In The Editor

-

Select the GameObject that has the LeanLocalization component, then click the Current Language > List button.

-

-
-

In Game Using UI

- -

Drag and drop the GameObject that has the LeanLocalization component into your event Object field, and select the LeanLocalization.SetCurrentLanguage function.

-

-
-

In Game Using C#

-

Simply set the Lean.Localization.LeanLocalization.CurrentLanguage static property. For example:

-
Lean.Localization.LeanLocalization.CurrentLanguage = "English";
-

-
-

How do I Get a Translation From C# Code?

-

If you just want to get translated text, then you can call:

-
Lean.Localization.LeanLocalization.GetTranslationText("YourPhraseNameHere");
-

If you want a Unity Object (e.g. Sprite), then you can call:

-
Lean.Localization.LeanLocalization.GetTranslationObject("YourPhraseNameHere");
-

-
-

How do I Add to the Language List?

-

If you're not happy with the default language selection, then you can open LeanLocalization.cs, and edit the AddPresetLanguage list starting on line line 14. For example:

-
AddPresetLanguage("Korean", "ko", "ko-KR");
-

Where the first string is the language name, and the other strings are all culture names associated with that language.

-

-
-

How do I Localize Other Components?

-

To localize more components, simply implement the LeanLocalizedBehavior base class in your own components.

This class has the UpdateTranslation(LeanTranslation translation); method, where the specified translation will be null if it doesn't exist. If it does exist then you can read the translation.Data value, you can then cast this to the required type before use.

Take a look at the code for LeanLocalizedSpriteRenderer to see just how easy this is.

NOTE:translation.Data is a System.Object, so you must verify it's type before casting it out.
-

-
-

How do I better organize my translations?

-

The more translations you add to your project, the more difficult Lean Localization can be to use, because the translation name dropdown list will become increasingly long.

To fix this, you can organize your translations into groups.

To do this, simply add forward slashes to your translation names when creating them.

EXAMPLE: MyGroup/MyTranslation

When using a translation name dropdown, this will automatically place MyTranslation into a group called MyGroup.

NOTE: If you change the name of a translation after you created it, then any components that point to that translation name will point to the old and now non-existent translation. You must manually update these.
-

-
-

How do I use prefabs?

-

If you have many translations or use many scenes then you may want to use prefabs instead of placing everything in the scene.

-

-
-

Step 1

-

Drag and drop your phrases, CSV loaders, and tokens into your Project window, turning it into a prefab.

-

-
-

Step 2

-

Delete your prefab instances from the scene.

-

-
-

Step 3

-

Drag and drop your prefabs (or a root folder they belong to) into the LeanLocalization.Prefabs setting.

-

-
-

Step 4

-

Done!

Your localizations should now be automatically loaded from prefabs, giving you better performance, and improved organization.

NOTE: If your prefab points to an asset folder, then you must view the LeanLocalization inspector to force the folder contents to update. Folder contents like this can only be accessed in the editor, so you must do this to trigger its update.

If you have many LeanLocalization components in different scenes, then this may be tedious to do. To fix this you can make your LeanLocalization component itself a prefab too, so you only have to view the prefab itself to trigger the update.

-

-
-

How do I use tokens?

-

Tokens allow you to find and replace text. For example, if you want to include the player's name inside a localized text field, then the tokens feature allows you to do this.

-

-
-

Step 1 - Create tokens

-

To create a token you can either:

Method 1  Create a new GameObject and add the LeanToken component.
Method 2  Type the name of a token into the LeanLocalization > Tokens search box, and click the Add button.

You've now created a token, where the GameObject name controls the name of the token.

-

-
-

Step 2 - Insert tokens into text

-

A token can be added using curly braces, like this:

-
Hi, my name is {NAME}!
-

Where the token GameObject is called NAME.

-

-
-

Step 3 - Done!

-

Your translated text should now automatically have any tokens replaced.

You can also change the value of a token in game using the LeanToken.SetValue method.

NOTE: If you want to be able to change a token value and have it persist across multiple scenes, then you should place the token in a prefab, and add it to the LeanLocalization.Prefabs list.
-

-
-

What are Cultures?

-

Cultures allow you to associate language codes with language names. For example, English might be associated with en-GB, en-US, etc.

When you start your application the current device language code will be loaded, and the associated language will be chosen.

NOTE: The LeanLocalization component's DetectLanguage setting defines how the initial language name or culture name will be picked.
-

-
-

Why can you only translate Text, Object, and Sprite?

-

Internally, the LeanPhrase component only stores Text (string) and Object (UnityEngine.Object) types.

Sprites in the Unity project window are stored as children of their source image. This means when you drag and drop a sprite, you're usually dragging and dropping the parent image, which may give you undesired behaviour when you drag it into an Object field.

To avoid any unexpected behaviour, I added the additional Sprite setting, so you can drag and drop the sprite's parent image, and Unity will automatically drop the sprite in.

This issue doesn't occur for most other scenarios, so you can use the Object type for everything else like Mesh, Material, etc.

-
-

-

Assets

-

Here's a list of all my other assets, please check them out!

You can also view this list on my Asset Store page.



-
Lean Touch
-

Lean Touch

-

Rapidly develop your game with consistent input across desktop & mobile using Lean Touch. This lightweight asset comes with many modular components, allowing you to customize them to your exact project needs!





-
Lean Touch+
-

Lean Touch+

-

Lean Touch+ is an extension to the popular Lean Touch asset, adding many more example scenes.





-
Lean Localization
-

Lean Localization

-

Lean Localization is a localization library that's designed to be as simple to use as possible for both designers, and programmers.





-
Lean Pool
-

Lean Pool

-

Quickly optimize the performance of your games using Lean Pool. Within minutes you can use this lightweight asset to preload, recycle, and limit the spawning of your prefabs.





-
Lean Transition
-

Lean Transition

-

Quickly polish your games using Lean Transition. This asset allows you to easily tween or animate almost anything in your game, making it transition smoothly.





-
Lean GUI
-

Lean GUI

-

Lean GUI is a colllection of components that extend Unity's GUI system, allowing you to rapidly enhance the user experience (UX) of your game's UI.





-
Paint in 3D
-

Paint in 3D

-

Paint all your objects using Paint in 3D - both in game, and in editor. All features are optimized with GPU accelerated texture painting, so you can enjoy consistent performance, even if you paint your objects one million times!





-
Destructible 2D
-

Destructible 2D

-

Unlock the full potential of your 2D games using Destructible 2D, this asset allows you to quickly convert all your boring solid sprites into fully destructible ones!





-
Space Graphics Toolkit
-

Space Graphics Toolkit

-

Quickly make the space scene of your dreams using Space Graphics Toolkit. This huge collection of space effects can be customized and combined in any way you like, allowing you to quickly make realistic or fantasy worlds. Each feature has been heavily optimized to run on almost any device and platform.





-
Planet Pack - Space Graphics Toolkit
-

Planet Pack - Space Graphics Toolkit

-

This pack contains 26 high detail PBR planets, all finished using the powerful planet features of Space Graphics Toolkit (SGT). This is a standalone package, so SGT is not required. You can even use the included features to turn your own planets into beautiful worlds!





-
Volumetric Audio
-

Volumetric Audio

-

Unity sounds only emanate from a single point source. This is great for explosions and footsteps, but quite often you need something more advanced. Volumetric Audio is an easy to use package that allows you to define boxes, spheres, capsules, paths, or meshes that sounds can emanate from.





-

-

Versions

-

1.2.7

-

Updated documentation.

-

-

1.2.6

-

Fixed LeanLocalization.SetToken method.

-

-

1.2.5

-

Fixed "Default Language" fallback for missing translations.

-

-

1.2.4

-

Added Lean/Localization/TextMeshPro extension package.
Added missing translation warning.
Added duplicate translation warning.
Added prefab support.
Renamed LeanPhrasePathAttribute to LeanTranslationNameAttribute.
Renamed LeanLocalization Phrases list to Translations.
Renamed LeanTranslation.Text/Object to .Data.
Replaced text args with LeanToken.

-

-

1.2.3

-

Fixed CSV file export.

-

-

1.2.2

-

Improved phrase updating code.

-

-

1.2.1

-

Missing translations will now fall back to the Default Language.
Allowed multiple localizations with the same settings to be active at the same time.

-

-

1.2.0

-

Moved main build to Unity 2017.4.0f1.
Restructured project files.
Rewrote core code to be simpler.
Simplified demo scenes.
Moved phrases and translations to LeanPhrase component.
Improved phrase organization using hierarchy.
Added phrase search box.
Added LeanLocalization.SetCurrentLanguage(int) method.

NOTE: All major components have been rewritten.

-

-

-

Components

-

LeanHelper

-

This class contains useful methods used in almost all of my code.

-

DampenFactor

-

This gives you the time-independent 't' value for lerp when used for dampening. This returns 1 in edit mode, or if dampening is less than 0.

-

Destroy

-

This allows you to destroy the target object in game and in edit mode, and it returns null.

-

GetObjectFromSerializedProperty

-

This gives you the actual object behind a SerializedProperty given to you by a property drawer.

-

-

-

LeanInspector<T>

-

This class allows you to quickly make custom inspectors with common features.

-

-

-

IPoolable

-

If you implement this interface in a component on your pooled prefab, then the OnSpawn and OnDespawn methods will be automatically called when the associated LeanGameObjectPool.Notification = PoolableInterface.

-

-

-

LeanClassPool<T>

-

This class allows you to pool normal C# classes, for example:

var foo = Lean.Pool.LeanClassPool.Spawn() ?? new Foo();

Lean.Pool.LeanClassPool.Despawn(foo);

-

Spawn

-

This will either return a pooled class instance, or null. If an instance it found, onSpawn will be called with it. NOTE: onSpawn is expected to not be null.

-

Spawn

-

This will either return a pooled class instance, or null.

All pooled classes will be checked with match to see if they qualify.

NOTE:  match is expected to not be null.

-

Spawn

-

This will either return a pooled class instance, or null.

All pooled classes will be checked with match to see if they qualify.

If an instance it found, onSpawn will be called with it.

NOTE:  match is expected to not be null.
NOTE:  onSpawn is expected to not be null.

-

Despawn

-

This will pool the passed class instance.

-

Despawn

-

This will pool the passed class instance.

If you need to perform despawning code then you can do that via onDespawn.

-

-

-

LeanGameObjectPool

-

This component allows you to pool GameObjects, giving you a very fast alternative to Instantiate and Destroy.

Pools also have settings to preload, recycle, and set the spawn capacity, giving you lots of control over your spawning.

-

Instances

-

All active and enabled pools in the scene.

-

Prefab

-

The prefab this pool controls.

-

Notification

-

If you need to peform a special action when a prefab is spawned or despawned, then this allows you to control how that action is performed.

None If you use this then you must rely on the OnEnable and OnDisable messages.
SendMessage The prefab clone is sent the OnSpawn and OnDespawn messages.
BroadcastMessage The prefab clone and all its children are sent the OnSpawn and OnDespawn messages.
IPoolable The prefab clone's components implementing IPoolable are called.
Broadcast IPoolable The prefab clone and all its child components implementing IPoolable are called.

-

Preload

-

Should this pool preload some clones?

-

Capacity

-

Should this pool have a maximum amount of spawnable clones?

-

Recycle

-

If the pool reaches capacity, should new spawns force older ones to despawn?

-

Persist

-

Should this pool be marked as DontDestroyOnLoad?

-

Stamp

-

Should the spawned clones have their clone index appended to their name?

-

Warnings

-

Should detected issues be output to the console?

-

TryFindPoolByPrefab

-

Find the pool responsible for handling the specified prefab.

-

TryFindPoolByClone

-

Find the pool responsible for handling the specified prefab clone.

NOTE:  This can be an expensive operation if you have many large pools.

-

Spawned

-

Returns the amount of spawned clones.

-

Despawned

-

Returns the amount of despawned clones.

-

Total

-

Returns the total amount of spawned and despawned clones.

-

Spawn

-

This will either spawn a previously despanwed/preloaded clone, recycle one, create a new one, or return null.

-

TrySpawn

-

This will either spawn a previously despanwed/preloaded clone, recycle one, create a new one, or return null.

-

[CONTEXT] Despawn Oldest

-

This will despawn the oldest prefab clone that is still spawned.

-

[CONTEXT] Despawn All

-

This method will despawn all currently spawned prefabs managed by this pool.

-

Despawn

-

This will either instantly despawn the specified gameObject, or delay despawn it after t seconds.

-

[CONTEXT] Preload One More

-

This method will create an additional prefab clone and add it to the despawned list.

-

[CONTEXT] Preload All

-

This will preload the pool based on the Preload setting.

-

-

-

LeanPool

-

This class handles the association between a spawned prefab, and the LeanGameObjectPool component that manages it.

-

LeanGameObjectPool>

-

This stores all references between a spawned GameObject and its pool.

-

Spawn

-

This allows you to spawn a prefab via Component.

-

Spawn

-

This allows you to spawn a prefab via Component.

-

Spawn

-

This allows you to spawn a prefab via Component.

-

Spawn

-

This allows you to spawn a prefab via GameObject.

-

Spawn

-

This allows you to spawn a prefab via GameObject.

-

Spawn

-

This allows you to spawn a prefab via GameObject.

-

DespawnAll

-

This will despawn all pool clones.

-

Despawn

-

This allows you to despawn a clone via Component, with optional delay.

-

Despawn

-

This allows you to despawn a clone via GameObject, with optional delay.

-

-

-
-
-

Index

-

Thank you for using Lean Localization ❤️

-

How do I upgrade?

-

What is Lean Localization?

-

How do I use it?

-

How do I change language?

-

How do I Get a Translation From C# Code?

-

How do I Add to the Language List?

-

How do I Localize Other Components?

-

How do I better organize my translations?

-

How do I use prefabs?

-

How do I use tokens?

-

What are Cultures?

-

Why can you only translate Text, Object, and Sprite?

-

-

Assets

-

Lean Touch

-

Lean Touch+

-

Lean Localization

-

Lean Pool

-

Lean Transition

-

Lean GUI

-

Paint in 3D

-

Destructible 2D

-

Space Graphics Toolkit

-

Planet Pack - Space Graphics Toolkit

-

Volumetric Audio

-

-

Versions

-

1.2.7

-

1.2.6

-

1.2.5

-

1.2.4

-

1.2.3

-

1.2.2

-

1.2.1

-

1.2.0

-

-

Components

-

LeanHelper

-

LeanInspector<T>

-

IPoolable

-

LeanClassPool<T>

-

LeanGameObjectPool

-

LeanPool

-
-
-
- - -- cgit v1.2.3