From a2d1423ade10c1178dba4351f57f4de34016f541 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 12:48:25 +0700 Subject: [PATCH 01/34] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 78e2007..0b57160 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ You can add UPM Scrope like this: ``` Name: YunasawaStudio URL: https://package.openupm.com -Scope(s): com.yunasawa.ynl +Scope(s): com.yunasawa.ynl.simpleaisystem ``` Here is how you can do it: How to register a UPM scope(s) From 7311de5686f7ed84c8d926e833aa82027d836ec7 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 13:52:46 +0700 Subject: [PATCH 02/34] Update README.md From 3bdbb6d9bb82c70a912111f38e99cd8de7441ad3 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 13:55:46 +0700 Subject: [PATCH 03/34] Update README.md From 7633e278e7e2f5c349238c52f4db0e9936c956c8 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 14:00:33 +0700 Subject: [PATCH 04/34] Create Test.md --- Test.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Test.md diff --git a/Test.md b/Test.md new file mode 100644 index 0000000..7f70adf --- /dev/null +++ b/Test.md @@ -0,0 +1,9 @@ + +

★ How to use AI Behaviour Editor

+ +
    +
  • Step 1: Create AI Behaviour in your Project window like this and name it as you want.
  • +
    +
+ +
From 3006b51cf478528c7dff3bb69216a704539292e4 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 14:23:05 +0700 Subject: [PATCH 05/34] Update Test.md --- Test.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Test.md b/Test.md index 7f70adf..98a24e0 100644 --- a/Test.md +++ b/Test.md @@ -2,8 +2,23 @@

★ How to use AI Behaviour Editor

    -
  • Step 1: Create AI Behaviour in your Project window like this and name it as you want.
  • +
  • Create AI Behaviour in your Project window like this and name it as you want.
  • +
    +
    + + Once you created the AI Behaviour , double-click on it to open the Editor Window. Or you can manually open it from Toolbar buttons. +
    +
    +
    +
    +
  • After you open the Editor Window, everything will seem blank.
  • +
    + +
    + +
  • Click on Add State and a new state box will appear. You can Rename the state by pressing the "Pen" icon or Remove it by pressing the X button
  • +
  • Please make sure that all the States will have distinct names.
From 52436a14bcb5e156876e1b77b7fc0bf91f7d28ce Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 14:37:51 +0700 Subject: [PATCH 06/34] Update Test.md --- Test.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Test.md b/Test.md index 98a24e0..5574b0c 100644 --- a/Test.md +++ b/Test.md @@ -13,12 +13,29 @@

  • After you open the Editor Window, everything will seem blank.
  • -
    - +
  • Click on Add State and a new state box will appear. You can Rename the state by pressing the "Pen" icon or Remove it by pressing the X button
  • Please make sure that all the States will have distinct names.
  • +
    + +
  • After creating all the states you want, choose one and one the main side, press on Add button on ACTION window and TRANSITION window.
  • +
  • You can click on the box to open a selecting window, with Action box, you can choose the actions that you want, and with Decision box, you can choose the decisions for the states.
  • +
  • The window looks like this:
  • +
    +
    +
    +
    + + + + + +
    + +
  • After you finish editting everything, select the AI Behaviour asset, choose Save Data to save all your changes, otherwise, you will regret not did that.
  • + From 6c859f81c1e39e790205f7686d116ccdf5067e44 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 14:38:15 +0700 Subject: [PATCH 07/34] Update README.md --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index 0b57160..8d0c6cc 100644 --- a/README.md +++ b/README.md @@ -54,3 +54,44 @@ com.yunasawa.ynl.simpleaisystem ``` + +
    +

    ★ How to use AI Behaviour Editor

    + +
      +
    • Create AI Behaviour in your Project window like this and name it as you want.
    • +
      +
      +
      + + Once you created the AI Behaviour , double-click on it to open the Editor Window. Or you can manually open it from Toolbar buttons. +
      +
      +
      +
      +
    • After you open the Editor Window, everything will seem blank.
    • + +
      + +
    • Click on Add State and a new state box will appear. You can Rename the state by pressing the "Pen" icon or Remove it by pressing the X button
    • +
    • Please make sure that all the States will have distinct names.
    • +
      + +
    • After creating all the states you want, choose one and one the main side, press on Add button on ACTION window and TRANSITION window.
    • +
    • You can click on the box to open a selecting window, with Action box, you can choose the actions that you want, and with Decision box, you can choose the decisions for the states.
    • +
    • The window looks like this:
    • +
      +
      +
      +
      + + + + + +
      + +
    • After you finish editting everything, select the AI Behaviour asset, choose Save Data to save all your changes, otherwise, you will regret not did that.
    • +
    + +
    From 43176402eeed89f8db1ae8ccda292576bfedc95a Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 14:38:53 +0700 Subject: [PATCH 08/34] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 8d0c6cc..ecdf6fe 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,6 @@ com.yunasawa.ynl.simpleaisystem

    ★ How to use AI Behaviour Editor

    -
    • Create AI Behaviour in your Project window like this and name it as you want.

    • From b0dac7e757e5130c10f6f74681a332eea549642b Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 15:07:45 +0700 Subject: [PATCH 09/34] Create README-vi.md --- Documents/README-vi.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Documents/README-vi.md diff --git a/Documents/README-vi.md b/Documents/README-vi.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Documents/README-vi.md @@ -0,0 +1 @@ + From 008f7b22adee2f9d9195907f624cc12a3971e4e0 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 15:09:05 +0700 Subject: [PATCH 10/34] Update README.md --- README.md | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/README.md b/README.md index ecdf6fe..2964c0a 100644 --- a/README.md +++ b/README.md @@ -55,42 +55,6 @@ com.yunasawa.ynl.simpleaisystem
    -
    -

    ★ How to use AI Behaviour Editor

      -
    • Create AI Behaviour in your Project window like this and name it as you want.
    • -
      -
      -
      - - Once you created the AI Behaviour , double-click on it to open the Editor Window. Or you can manually open it from Toolbar buttons. -
      -
      -
      -
      -
    • After you open the Editor Window, everything will seem blank.
    • - -
      - -
    • Click on Add State and a new state box will appear. You can Rename the state by pressing the "Pen" icon or Remove it by pressing the X button
    • -
    • Please make sure that all the States will have distinct names.
    • -
      - -
    • After creating all the states you want, choose one and one the main side, press on Add button on ACTION window and TRANSITION window.
    • -
    • You can click on the box to open a selecting window, with Action box, you can choose the actions that you want, and with Decision box, you can choose the decisions for the states.
    • -
    • The window looks like this:
    • -
      -
      -
      -
      - - - - - -
      - -
    • After you finish editting everything, select the AI Behaviour asset, choose Save Data to save all your changes, otherwise, you will regret not did that.
    • +
    • DOCUMENT - Vietnamese
    - -
    From 7d6cd69c2144ac7714363b46370e3e96ad617422 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 15:09:30 +0700 Subject: [PATCH 11/34] Update README-vi.md --- Documents/README-vi.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Documents/README-vi.md b/Documents/README-vi.md index 8b13789..e202fb7 100644 --- a/Documents/README-vi.md +++ b/Documents/README-vi.md @@ -1 +1,39 @@ +
    +

    ★ How to use AI Behaviour Editor

    +
      +
    • Create AI Behaviour in your Project window like this and name it as you want.
    • +
      +
      +
      + + Once you created the AI Behaviour , double-click on it to open the Editor Window. Or you can manually open it from Toolbar buttons. +
      +
      +
      +
      +
    • After you open the Editor Window, everything will seem blank.
    • + +
      + +
    • Click on Add State and a new state box will appear. You can Rename the state by pressing the "Pen" icon or Remove it by pressing the X button
    • +
    • Please make sure that all the States will have distinct names.
    • +
      + +
    • After creating all the states you want, choose one and one the main side, press on Add button on ACTION window and TRANSITION window.
    • +
    • You can click on the box to open a selecting window, with Action box, you can choose the actions that you want, and with Decision box, you can choose the decisions for the states.
    • +
    • The window looks like this:
    • +
      +
      +
      +
      + + + + + +
      + +
    • After you finish editting everything, select the AI Behaviour asset, choose Save Data to save all your changes, otherwise, you will regret not did that.
    • +
    +
    From 6d482628423507e0ba6609c0a627dbb3e36f0451 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 15:09:59 +0700 Subject: [PATCH 12/34] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2964c0a..272c178 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,11 @@ Contact us: yunasawa200@gmail.com --> + +

    ★ Installation

    Install from Git URL

    @@ -54,7 +59,3 @@ com.yunasawa.ynl.simpleaisystem ```
    - - From b9bc75b515e732aacb604f4c34258dabce21c98b Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 15:10:20 +0700 Subject: [PATCH 13/34] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 272c178..d844057 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ Contact us: yunasawa200@gmail.com -->
    From 4017325d1d49d8661aa4e7544bcc4d81d2dba36e Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 15:12:04 +0700 Subject: [PATCH 14/34] Update README-vi.md --- Documents/README-vi.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documents/README-vi.md b/Documents/README-vi.md index e202fb7..832528e 100644 --- a/Documents/README-vi.md +++ b/Documents/README-vi.md @@ -1,3 +1,5 @@ +

    YのL - Simple AI System (Instuction - EN)

    +

    ★ How to use AI Behaviour Editor

      From 382b9ceecb71eab7ddd65e93fe1c72606e6a7113 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 15:12:19 +0700 Subject: [PATCH 15/34] Create README-en.md --- Documents/README-en.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documents/README-en.md diff --git a/Documents/README-en.md b/Documents/README-en.md new file mode 100644 index 0000000..832528e --- /dev/null +++ b/Documents/README-en.md @@ -0,0 +1,41 @@ +

      YのL - Simple AI System (Instuction - EN)

      + +
      +

      ★ How to use AI Behaviour Editor

      +
        +
      • Create AI Behaviour in your Project window like this and name it as you want.
      • +
        +
        +
        + + Once you created the AI Behaviour , double-click on it to open the Editor Window. Or you can manually open it from Toolbar buttons. +
        +
        +
        +
        +
      • After you open the Editor Window, everything will seem blank.
      • + +
        + +
      • Click on Add State and a new state box will appear. You can Rename the state by pressing the "Pen" icon or Remove it by pressing the X button
      • +
      • Please make sure that all the States will have distinct names.
      • +
        + +
      • After creating all the states you want, choose one and one the main side, press on Add button on ACTION window and TRANSITION window.
      • +
      • You can click on the box to open a selecting window, with Action box, you can choose the actions that you want, and with Decision box, you can choose the decisions for the states.
      • +
      • The window looks like this:
      • +
        +
        +
        +
        + + + + + +
        + +
      • After you finish editting everything, select the AI Behaviour asset, choose Save Data to save all your changes, otherwise, you will regret not did that.
      • +
      + +
      From 4c2991c46328389680a6048a144cb18af7366380 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 22:27:59 +0700 Subject: [PATCH 16/34] Update README-vi.md --- Documents/README-vi.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Documents/README-vi.md b/Documents/README-vi.md index 832528e..ab4e09f 100644 --- a/Documents/README-vi.md +++ b/Documents/README-vi.md @@ -1,29 +1,29 @@

      YのL - Simple AI System (Instuction - EN)

      -

      ★ How to use AI Behaviour Editor

      +

      ★ Cách sử dụng AI Behaviour Editor

        -
      • Create AI Behaviour in your Project window like this and name it as you want.
      • +
      • Tạo AI Behaviour trong cửa sổ Project như sau và đặt tên tùy thích.


      • - Once you created the AI Behaviour , double-click on it to open the Editor Window. Or you can manually open it from Toolbar buttons. + Một khi đã tạo xong AI Behaviour , click đúp để mở cửa sổ Editor. Hoặc bạn có thể mở một cách thủ công bằng các nút trên Toolbar.



        -
      • After you open the Editor Window, everything will seem blank.
      • +
      • Sau khi mở cửa sổ Editor, mọi thứ trông có vẻ trống không.

      • -
      • Click on Add State and a new state box will appear. You can Rename the state by pressing the "Pen" icon or Remove it by pressing the X button
      • -
      • Please make sure that all the States will have distinct names.
      • +
      • Click vào nút Add State và một khung state mới sẽ xuất hiện. Bạn có thể đặt tên cho state bằng cách nhấn nút hình "Cây bút" hoặc loại bỏ nó bằng nút X
      • +
      • Hãy chắc chắn rằng tất cả các state đều có tên riêng biệt.

      • -
      • After creating all the states you want, choose one and one the main side, press on Add button on ACTION window and TRANSITION window.
      • -
      • You can click on the box to open a selecting window, with Action box, you can choose the actions that you want, and with Decision box, you can choose the decisions for the states.
      • -
      • The window looks like this:
      • +
      • Sau khi tạo tất cả các bạn muốn, chọn một và trên màn hình chính, nhấn nút Add trên cửa sổ ACTION và cửa sổ TRANSITION.
      • +
      • Bạn có thể nhấp vào khung để mở cửa sổ chọn, với khung Action, bạn có thể chọn các hành động mà bạn muốn và với khung Decision, bạn có thể chọn các quyết định cho các trạng thái tiếp theo.
      • +
      • Cửa sổ trông như thế này:



      • @@ -35,7 +35,7 @@ -
      • After you finish editting everything, select the AI Behaviour asset, choose Save Data to save all your changes, otherwise, you will regret not did that.
      • +
      • Sau khi chỉnh sửa xong mọi thứ, hãy chọn AI Behaviour, chọn Save Data để lưu tất cả các thay đổi của bạn, nếu không, bạn sẽ hối hận vì đã không làm điều đó.
      From f1006d71cbec40591b597242ee651c553a018829 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 22:28:37 +0700 Subject: [PATCH 17/34] Update README-en.md --- Documents/README-en.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documents/README-en.md b/Documents/README-en.md index 832528e..3218071 100644 --- a/Documents/README-en.md +++ b/Documents/README-en.md @@ -22,7 +22,7 @@
    • After creating all the states you want, choose one and one the main side, press on Add button on ACTION window and TRANSITION window.
    • -
    • You can click on the box to open a selecting window, with Action box, you can choose the actions that you want, and with Decision box, you can choose the decisions for the states.
    • +
    • You can click on the box to open a selecting window, with Action box, you can choose the actions that you want, and with Decision box, you can choose the decisions for the next states.
    • The window looks like this:


    • @@ -35,7 +35,7 @@ -
    • After you finish editting everything, select the AI Behaviour asset, choose Save Data to save all your changes, otherwise, you will regret not did that.
    • +
    • After you finish editing everything, select the AI Behaviour asset, choose Save Data to save all your changes, otherwise, you will regret not did that.
    From 1356fbca89d1b403005ebbf2f9bb7c07c97ab591 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 22:49:33 +0700 Subject: [PATCH 18/34] Update Test.md --- Test.md | 49 +++++++++++++++---------------------------------- 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/Test.md b/Test.md index 5574b0c..56f545d 100644 --- a/Test.md +++ b/Test.md @@ -1,40 +1,21 @@ -

    ★ How to use AI Behaviour Editor

    +

    ★ How to create new Action or Decision

      -
    • Create AI Behaviour in your Project window like this and name it as you want.
    • -
      -
      -
      - - Once you created the AI Behaviour , double-click on it to open the Editor Window. Or you can manually open it from Toolbar buttons. -
      -
      -
      -
      -
    • After you open the Editor Window, everything will seem blank.
    • - -
      - -
    • Click on Add State and a new state box will appear. You can Rename the state by pressing the "Pen" icon or Remove it by pressing the X button
    • -
    • Please make sure that all the States will have distinct names.
    • -
      - -
    • After creating all the states you want, choose one and one the main side, press on Add button on ACTION window and TRANSITION window.
    • -
    • You can click on the box to open a selecting window, with Action box, you can choose the actions that you want, and with Decision box, you can choose the decisions for the states.
    • -
    • The window looks like this:
    • -
      -
      -
      -
      - - - - - -
      - -
    • After you finish editting everything, select the AI Behaviour asset, choose Save Data to save all your changes, otherwise, you will regret not did that.
    • +
    • First of all, you have to pay attention on some important things:
    • +
        +
      • Whenever you create a new Action or Decision, make sure to put it inside namespace YNL.SimpleAISystem.
      • +
      • Every created Action should have AIAction as a prefix, and every created Decision should have AIDecision as a prefix too.
      • +
      +
    • Now come to the main part; after you follow the notes above and created a new Action or Decision, you need to create 2 constructors, one have no parameter and one have AIController as the only parameter.
    • +
    • Now is your part, inside AIAction, there are 5 methods that you can override.
    • +
        +
      • void Initialize(AIController controller): Here you can initialize everything you need, such as getting the components, ect.
      • +
      • void Convert(SerializableDictionary properties): Here you can convert the keys and values into the types you want. Keys are the name of properties and values are the values of the properties. You can see the sample below to make it easier to imagine.
      • +
      • void DoAction(): Here you perform the actions as you want.
      • +
      • void OnEnterState(): This will be called when entering the state.
      • +
      • void OnExitState(): This will be called when exiting the state.
      • +
    From 38d13874e05dc1b5d150d54a9406d2002cf286c2 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 22:51:06 +0700 Subject: [PATCH 19/34] Update Test.md --- Test.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Test.md b/Test.md index 56f545d..62f45b1 100644 --- a/Test.md +++ b/Test.md @@ -16,6 +16,14 @@
  • void OnEnterState(): This will be called when entering the state.
  • void OnExitState(): This will be called when exiting the state.
  • +
  • Come to AIDecision, there are also 5 methods that you can override.
  • +
      +
    • void Initialize(AIController controller): Here you can initialize everything you need, such as getting the components, ect.
    • +
    • void Convert(SerializableDictionary properties): Here you can convert the keys and values into the types you want. Keys are the name of properties and values are the values of the properties. You can see the sample below to make it easier to imagine.
    • +
    • bool DoDecision(): Here you decide when to move to next state by returning this method a boolean.
    • +
    • void OnEnterState(): This will be called when entering the state.
    • +
    • void OnExitState(): This will be called when exiting the state.
    • +
    From 86ce78726fbaf5c146fd4249581b1af278d8445b Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 22:57:56 +0700 Subject: [PATCH 20/34] Update Test.md --- Test.md | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/Test.md b/Test.md index 62f45b1..52a064b 100644 --- a/Test.md +++ b/Test.md @@ -7,7 +7,9 @@
  • Whenever you create a new Action or Decision, make sure to put it inside namespace YNL.SimpleAISystem.
  • Every created Action should have AIAction as a prefix, and every created Decision should have AIDecision as a prefix too.
  • +
  • Now come to the main part; after you follow the notes above and created a new Action or Decision, you need to create 2 constructors, one have no parameter and one have AIController as the only parameter.
  • +
  • Now is your part, inside AIAction, there are 5 methods that you can override.
    • void Initialize(AIController controller): Here you can initialize everything you need, such as getting the components, ect.
    • @@ -16,6 +18,7 @@
    • void OnEnterState(): This will be called when entering the state.
    • void OnExitState(): This will be called when exiting the state.
    +
  • Come to AIDecision, there are also 5 methods that you can override.
    • void Initialize(AIController controller): Here you can initialize everything you need, such as getting the components, ect.
    • @@ -26,5 +29,100 @@
    +```csharp +using UnityEngine; +using YNL.Extensions.Methods; +using YNL.Utilities.Addons; + +namespace YNL.SimpleAISystem +{ + public class AIActionSample : AIAction + { + public AIActionSample() : base(null) { } + public AIActionSample(AIController controller) : base(controller) { } + + private Rigidbody _rigidbody; + public int Distance; + public KeyCode KeyCode; + + public override void Initialize(AIController controller) + { + base.Initialize(controller); + + _rigidbody = controller.Root.GetComponent(); + } + + public override void Convert(SerializableDictionary properties) + { + Distance = int.Parse(properties["Distance"]); + KeyCode = MEnum.Parse(properties["KeyCode"]); + } + + public override void DoAction() + { + // Perform the actions + } + + public override void OnEnterState() + { + // Do something when entering the state + } + + public override void OnExitState() + { + // Do something when exiting the state + } + } +} +``` + +```csharp +using UnityEngine; +using YNL.Extensions.Methods; +using YNL.Utilities.Addons; + +namespace YNL.SimpleAISystem +{ + public class AIDecisionSample : AIDecision + { + public AIDecisionSample() : base(null) { } + public AIDecisionSample(AIController controller) : base(controller) { } + + private Rigidbody _rigidbody; + public int Distance; + public KeyCode KeyCode; + + public override void Initialize(AIController controller) + { + base.Initialize(controller); + + _rigidbody = controller.Root.GetComponent(); + } + + public override void Convert(SerializableDictionary properties) + { + Distance = int.Parse(properties["Distance"]); + KeyCode = MEnum.Parse(properties["KeyCode"]); + } + + public override bool DoDecision() + { + // Decise the transition + return true; + } + + public override void OnEnterState() + { + // Do something when entering the state + } + + public override void OnExitState() + { + // Do something when exiting the state + } + } +} +``` + From 218b1570a83930cf8d0e9858b390918bbb08c8a7 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 22:58:58 +0700 Subject: [PATCH 21/34] Update Test.md --- Test.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Test.md b/Test.md index 52a064b..12e1883 100644 --- a/Test.md +++ b/Test.md @@ -29,6 +29,9 @@ +
    + AIActionSample.cs + ```csharp using UnityEngine; using YNL.Extensions.Methods; @@ -76,6 +79,11 @@ namespace YNL.SimpleAISystem } ``` +
    + +
    + AIDecisionSample.cs + ```csharp using UnityEngine; using YNL.Extensions.Methods; @@ -124,5 +132,7 @@ namespace YNL.SimpleAISystem } ``` +
    + From 5dba3df9aa81b915869bc893e3b54dcad13b7bf2 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:03:24 +0700 Subject: [PATCH 22/34] Update Test.md --- Test.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Test.md b/Test.md index 12e1883..e970594 100644 --- a/Test.md +++ b/Test.md @@ -30,7 +30,7 @@
    - AIActionSample.cs + AIActionSample.cs (Sample for custom AIAction script) ```csharp using UnityEngine; @@ -44,7 +44,11 @@ namespace YNL.SimpleAISystem public AIActionSample() : base(null) { } public AIActionSample(AIController controller) : base(controller) { } + // Make the properties you want to hide as private; the Editor is currently not support + // Reference properties so you can only get it from Initialize() method private Rigidbody _rigidbody; + + // Make the properties you want to edit inside Editor as public public int Distance; public KeyCode KeyCode; @@ -57,7 +61,10 @@ namespace YNL.SimpleAISystem public override void Convert(SerializableDictionary properties) { + // Use converting method to convert string into the types you want. Distance = int.Parse(properties["Distance"]); + + // For enum you can use MEnum.Parse(string) as below KeyCode = MEnum.Parse(properties["KeyCode"]); } @@ -82,7 +89,7 @@ namespace YNL.SimpleAISystem
    - AIDecisionSample.cs + AIDecisionSample.cs (Sample for custom AIAction script) ```csharp using UnityEngine; @@ -96,7 +103,11 @@ namespace YNL.SimpleAISystem public AIDecisionSample() : base(null) { } public AIDecisionSample(AIController controller) : base(controller) { } + // Make the properties you want to hide as private; the Editor is currently not support + // Reference properties so you can only get it from Initialize() method private Rigidbody _rigidbody; + + // Make the properties you want to edit inside Editor as public public int Distance; public KeyCode KeyCode; @@ -109,7 +120,10 @@ namespace YNL.SimpleAISystem public override void Convert(SerializableDictionary properties) { + // Use converting method to convert string into the types you want. Distance = int.Parse(properties["Distance"]); + + // For enum you can use MEnum.Parse(string) as below KeyCode = MEnum.Parse(properties["KeyCode"]); } From d1eb6943d8add55fa55c4855086f9d30ca38db61 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:04:03 +0700 Subject: [PATCH 23/34] Update README-en.md --- Documents/README-en.md | 153 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) diff --git a/Documents/README-en.md b/Documents/README-en.md index 3218071..ef4c3d9 100644 --- a/Documents/README-en.md +++ b/Documents/README-en.md @@ -39,3 +39,156 @@
    + +
    +

    ★ How to create new Action or Decision

    + +
      +
    • First of all, you have to pay attention on some important things:
    • +
        +
      • Whenever you create a new Action or Decision, make sure to put it inside namespace YNL.SimpleAISystem.
      • +
      • Every created Action should have AIAction as a prefix, and every created Decision should have AIDecision as a prefix too.
      • +
      +
      +
    • Now come to the main part; after you follow the notes above and created a new Action or Decision, you need to create 2 constructors, one have no parameter and one have AIController as the only parameter.
    • +
      +
    • Now is your part, inside AIAction, there are 5 methods that you can override.
    • +
        +
      • void Initialize(AIController controller): Here you can initialize everything you need, such as getting the components, ect.
      • +
      • void Convert(SerializableDictionary properties): Here you can convert the keys and values into the types you want. Keys are the name of properties and values are the values of the properties. You can see the sample below to make it easier to imagine.
      • +
      • void DoAction(): Here you perform the actions as you want.
      • +
      • void OnEnterState(): This will be called when entering the state.
      • +
      • void OnExitState(): This will be called when exiting the state.
      • +
      +
      +
    • Come to AIDecision, there are also 5 methods that you can override.
    • +
        +
      • void Initialize(AIController controller): Here you can initialize everything you need, such as getting the components, ect.
      • +
      • void Convert(SerializableDictionary properties): Here you can convert the keys and values into the types you want. Keys are the name of properties and values are the values of the properties. You can see the sample below to make it easier to imagine.
      • +
      • bool DoDecision(): Here you decide when to move to next state by returning this method a boolean.
      • +
      • void OnEnterState(): This will be called when entering the state.
      • +
      • void OnExitState(): This will be called when exiting the state.
      • +
      +
    + +
    + AIActionSample.cs (Sample for custom AIAction script) + +```csharp +using UnityEngine; +using YNL.Extensions.Methods; +using YNL.Utilities.Addons; + +namespace YNL.SimpleAISystem +{ + public class AIActionSample : AIAction + { + public AIActionSample() : base(null) { } + public AIActionSample(AIController controller) : base(controller) { } + + // Make the properties you want to hide as private; the Editor is currently not support + // Reference properties so you can only get it from Initialize() method + private Rigidbody _rigidbody; + + // Make the properties you want to edit inside Editor as public + public int Distance; + public KeyCode KeyCode; + + public override void Initialize(AIController controller) + { + base.Initialize(controller); + + _rigidbody = controller.Root.GetComponent(); + } + + public override void Convert(SerializableDictionary properties) + { + // Use converting method to convert string into the types you want. + Distance = int.Parse(properties["Distance"]); + + // For enum you can use MEnum.Parse(string) as below + KeyCode = MEnum.Parse(properties["KeyCode"]); + } + + public override void DoAction() + { + // Perform the actions + } + + public override void OnEnterState() + { + // Do something when entering the state + } + + public override void OnExitState() + { + // Do something when exiting the state + } + } +} +``` + +
    + +
    + AIDecisionSample.cs (Sample for custom AIAction script) + +```csharp +using UnityEngine; +using YNL.Extensions.Methods; +using YNL.Utilities.Addons; + +namespace YNL.SimpleAISystem +{ + public class AIDecisionSample : AIDecision + { + public AIDecisionSample() : base(null) { } + public AIDecisionSample(AIController controller) : base(controller) { } + + // Make the properties you want to hide as private; the Editor is currently not support + // Reference properties so you can only get it from Initialize() method + private Rigidbody _rigidbody; + + // Make the properties you want to edit inside Editor as public + public int Distance; + public KeyCode KeyCode; + + public override void Initialize(AIController controller) + { + base.Initialize(controller); + + _rigidbody = controller.Root.GetComponent(); + } + + public override void Convert(SerializableDictionary properties) + { + // Use converting method to convert string into the types you want. + Distance = int.Parse(properties["Distance"]); + + // For enum you can use MEnum.Parse(string) as below + KeyCode = MEnum.Parse(properties["KeyCode"]); + } + + public override bool DoDecision() + { + // Decise the transition + return true; + } + + public override void OnEnterState() + { + // Do something when entering the state + } + + public override void OnExitState() + { + // Do something when exiting the state + } + } +} +``` + +
    + +
    + From 8fb538cbd508b7afeef72afcff5161e5a985f063 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:11:31 +0700 Subject: [PATCH 24/34] Update README-vi.md --- Documents/README-vi.md | 154 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) diff --git a/Documents/README-vi.md b/Documents/README-vi.md index ab4e09f..3c01a3a 100644 --- a/Documents/README-vi.md +++ b/Documents/README-vi.md @@ -39,3 +39,157 @@
    + +
    +

    ★ Cách tạo script Action hoặc Decision tùy chỉnh

    + +
      +
    • Đầu tiên, bạn cần chú ý một số điều quan trọng sau:
    • +
        +
      • Bất cứ khi nào bạn tạo Hành động hoặc Quyết định mới, hãy đảm bảo đặt nó trong không gian tên YNL.SimpleAISystem.
      • +
      • Mọi Action được tạo phải có AIAction làm tiền tố và mọi Decision được tạo cũng phải có AIDecision làm tiền tố.
      • +
      +
      +
    • Bây giờ đến phần chính; sau khi làm theo các ghi chú ở trên và tạo Action hoặc Decision mới, bạn cần tạo 2 constructor, một không có tham số và một có AIController làm tham số duy nhất.
    • +
      +
    • Bây giờ là phần của bạn, bên trong AIAction, có 5 phương thức mà bạn có thể override.
    • +
        +
      • void Initialize(AIController controller): Tại đây bạn có thể khởi tạo bất cứ thứ gì bạn cần, ví dụ như GetComponent,...
      • +
      • void Convert(SerializableDictionary properties): Tại đây bạn có thể chuyển keys và values thành các type mà bạn cần. Keys là tên của properties và values là giá trị của các properties đó. Bạn có thể xem code mẫu bên dưới để dễ hình dung hơn.
      • +
      • void DoAction(): Thực thi hành động mà bạn muốn tại đây.
      • +
      • void OnEnterState(): Hàm này sẽ được gọi mỗi khi vào một state mới.
      • +
      • void OnExitState(): Hàm này sẽ được gọi mỗi khi thoát khỏi 1 state.
      • +
      +
      +
    • Đến với AIDecision, ở đây cũng có 5 phương thức mà bạn có thể override.
    • +
        +
      • void Initialize(AIController controller): Tại đây bạn có thể khởi tạo bất cứ thứ gì bạn cần, ví dụ như GetComponent,...
      • +
      • void Convert(SerializableDictionary properties): Tại đây bạn có thể chuyển keys và values thành các type mà bạn cần. Keys là tên của properties và values là giá trị của các properties đó. Bạn có thể xem code mẫu bên dưới để dễ hình dung hơn.
      • +
      • bool DoDecision(): Ở đây bạn quyết định điều kiện nào để chuyển sang state khác bằng cách trả về một boolean.
      • +
      • void OnEnterState(): Hàm này sẽ được gọi mỗi khi vào một state mới.
      • +
      • void OnExitState(): Hàm này sẽ được gọi mỗi khi thoát khỏi 1 state.
      • +
      +
    + +
    + AIActionSample.cs (Sample for custom AIAction script) + +```csharp +using UnityEngine; +using YNL.Extensions.Methods; +using YNL.Utilities.Addons; + +namespace YNL.SimpleAISystem +{ + public class AIActionSample : AIAction + { + public AIActionSample() : base(null) { } + public AIActionSample(AIController controller) : base(controller) { } + + // Make the properties you want to hide as private; the Editor is currently not support + // Reference properties so you can only get it from Initialize() method + private Rigidbody _rigidbody; + + // Make the properties you want to edit inside Editor as public + public int Distance; + public KeyCode KeyCode; + + public override void Initialize(AIController controller) + { + base.Initialize(controller); + + _rigidbody = controller.Root.GetComponent(); + } + + public override void Convert(SerializableDictionary properties) + { + // Use converting method to convert string into the types you want. + Distance = int.Parse(properties["Distance"]); + + // For enum you can use MEnum.Parse(string) as below + KeyCode = MEnum.Parse(properties["KeyCode"]); + } + + public override void DoAction() + { + // Perform the actions + } + + public override void OnEnterState() + { + // Do something when entering the state + } + + public override void OnExitState() + { + // Do something when exiting the state + } + } +} +``` + +
    + +
    + AIDecisionSample.cs (Sample for custom AIAction script) + +```csharp +using UnityEngine; +using YNL.Extensions.Methods; +using YNL.Utilities.Addons; + +namespace YNL.SimpleAISystem +{ + public class AIDecisionSample : AIDecision + { + public AIDecisionSample() : base(null) { } + public AIDecisionSample(AIController controller) : base(controller) { } + + // Make the properties you want to hide as private; the Editor is currently not support + // Reference properties so you can only get it from Initialize() method + private Rigidbody _rigidbody; + + // Make the properties you want to edit inside Editor as public + public int Distance; + public KeyCode KeyCode; + + public override void Initialize(AIController controller) + { + base.Initialize(controller); + + _rigidbody = controller.Root.GetComponent(); + } + + public override void Convert(SerializableDictionary properties) + { + // Use converting method to convert string into the types you want. + Distance = int.Parse(properties["Distance"]); + + // For enum you can use MEnum.Parse(string) as below + KeyCode = MEnum.Parse(properties["KeyCode"]); + } + + public override bool DoDecision() + { + // Decise the transition + return true; + } + + public override void OnEnterState() + { + // Do something when entering the state + } + + public override void OnExitState() + { + // Do something when exiting the state + } + } +} +``` + +
    + +
    + + From 696a6adec09ee626aa9cc8a3062023dc1306e285 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:15:24 +0700 Subject: [PATCH 25/34] Update README-vi.md --- Documents/README-vi.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Documents/README-vi.md b/Documents/README-vi.md index 3c01a3a..8d99ae9 100644 --- a/Documents/README-vi.md +++ b/Documents/README-vi.md @@ -86,11 +86,11 @@ namespace YNL.SimpleAISystem public AIActionSample() : base(null) { } public AIActionSample(AIController controller) : base(controller) { } - // Make the properties you want to hide as private; the Editor is currently not support - // Reference properties so you can only get it from Initialize() method + // Để thuộc tính mà bạn muốn ẩn thành private; Editor hiện tại chưa hỗ trợ + // các thuộc tính tham chiếu, hãy tham chiếu chúng thông qua hàm Initialize() private Rigidbody _rigidbody; - // Make the properties you want to edit inside Editor as public + // Để thuộc tính mà bạn muốn hiện lên Editor thành public public int Distance; public KeyCode KeyCode; @@ -103,26 +103,26 @@ namespace YNL.SimpleAISystem public override void Convert(SerializableDictionary properties) { - // Use converting method to convert string into the types you want. + // Sử dụng các hàm chuyển đổi để biến string thành kiểu mà bạn cần Distance = int.Parse(properties["Distance"]); - // For enum you can use MEnum.Parse(string) as below + // Đối với enum bạn có thể dùng hàm MEnum.Parse(string) như sau KeyCode = MEnum.Parse(properties["KeyCode"]); } public override void DoAction() { - // Perform the actions + // Thực thi hành động } public override void OnEnterState() { - // Do something when entering the state + // Làm gì đó khi bắt đầu state } public override void OnExitState() { - // Do something when exiting the state + // Làm gì đó khi thoát khỏi state } } } @@ -145,11 +145,11 @@ namespace YNL.SimpleAISystem public AIDecisionSample() : base(null) { } public AIDecisionSample(AIController controller) : base(controller) { } - // Make the properties you want to hide as private; the Editor is currently not support - // Reference properties so you can only get it from Initialize() method + // Để thuộc tính mà bạn muốn ẩn thành private; Editor hiện tại chưa hỗ trợ + // các thuộc tính tham chiếu, hãy tham chiếu chúng thông qua hàm Initialize() private Rigidbody _rigidbody; - // Make the properties you want to edit inside Editor as public + // Để thuộc tính mà bạn muốn hiện lên Editor thành public public int Distance; public KeyCode KeyCode; @@ -162,27 +162,27 @@ namespace YNL.SimpleAISystem public override void Convert(SerializableDictionary properties) { - // Use converting method to convert string into the types you want. + // Sử dụng các hàm chuyển đổi để biến string thành kiểu mà bạn cần Distance = int.Parse(properties["Distance"]); - // For enum you can use MEnum.Parse(string) as below + // Đối với enum bạn có thể dùng hàm MEnum.Parse(string) như sau KeyCode = MEnum.Parse(properties["KeyCode"]); } public override bool DoDecision() { - // Decise the transition + // Quyết định quá trình chuyển đối của state return true; } public override void OnEnterState() { - // Do something when entering the state + // Làm gì đó khi bắt đầu state } public override void OnExitState() { - // Do something when exiting the state + // Làm gì đó khi thoát khỏi state } } } From a1ddd4d7d19ce6ff61d08375b7216a4fa56faa50 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:15:43 +0700 Subject: [PATCH 26/34] Update README-vi.md --- Documents/README-vi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documents/README-vi.md b/Documents/README-vi.md index 8d99ae9..486a4ff 100644 --- a/Documents/README-vi.md +++ b/Documents/README-vi.md @@ -1,4 +1,4 @@ -

    YのL - Simple AI System (Instuction - EN)

    +

    YのL - Simple AI System (Instuction - Vi)

    ★ Cách sử dụng AI Behaviour Editor

    From 24201445b19c6c5c0f12c634b3f608caf04ab63a Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:15:49 +0700 Subject: [PATCH 27/34] Update README-vi.md --- Documents/README-vi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documents/README-vi.md b/Documents/README-vi.md index 486a4ff..74d34a5 100644 --- a/Documents/README-vi.md +++ b/Documents/README-vi.md @@ -1,4 +1,4 @@ -

    YのL - Simple AI System (Instuction - Vi)

    +

    YのL - Simple AI System (Instuction - VI)

    ★ Cách sử dụng AI Behaviour Editor

    From 2cfa715ddfb9c5e845a13c9a6c0e14281d1f48a7 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:20:33 +0700 Subject: [PATCH 28/34] Update Test.md --- Test.md | 147 +------------------------------------------------------- 1 file changed, 2 insertions(+), 145 deletions(-) diff --git a/Test.md b/Test.md index e970594..a8fad84 100644 --- a/Test.md +++ b/Test.md @@ -1,152 +1,9 @@ -

    ★ How to create new Action or Decision

    +

    ★ How to set up your AI objects

      -
    • First of all, you have to pay attention on some important things:
    • -
        -
      • Whenever you create a new Action or Decision, make sure to put it inside namespace YNL.SimpleAISystem.
      • -
      • Every created Action should have AIAction as a prefix, and every created Decision should have AIDecision as a prefix too.
      • -
      -
      -
    • Now come to the main part; after you follow the notes above and created a new Action or Decision, you need to create 2 constructors, one have no parameter and one have AIController as the only parameter.
    • -
      -
    • Now is your part, inside AIAction, there are 5 methods that you can override.
    • -
        -
      • void Initialize(AIController controller): Here you can initialize everything you need, such as getting the components, ect.
      • -
      • void Convert(SerializableDictionary properties): Here you can convert the keys and values into the types you want. Keys are the name of properties and values are the values of the properties. You can see the sample below to make it easier to imagine.
      • -
      • void DoAction(): Here you perform the actions as you want.
      • -
      • void OnEnterState(): This will be called when entering the state.
      • -
      • void OnExitState(): This will be called when exiting the state.
      • -
      -
      -
    • Come to AIDecision, there are also 5 methods that you can override.
    • -
        -
      • void Initialize(AIController controller): Here you can initialize everything you need, such as getting the components, ect.
      • -
      • void Convert(SerializableDictionary properties): Here you can convert the keys and values into the types you want. Keys are the name of properties and values are the values of the properties. You can see the sample below to make it easier to imagine.
      • -
      • bool DoDecision(): Here you decide when to move to next state by returning this method a boolean.
      • -
      • void OnEnterState(): This will be called when entering the state.
      • -
      • void OnExitState(): This will be called when exiting the state.
      • -
      +
    • You can open the Sample Scene to have a better imagination of what you need. Go inside Packages/YのL - Simple AI System/Sample/Sample Scene; for now you can not open the scene because you have no right to open a read-only scene from a package. But don't worry, all you need to do is just copying the scene and paste it somewhere you want; then now you can open it
    -
    - AIActionSample.cs (Sample for custom AIAction script) - -```csharp -using UnityEngine; -using YNL.Extensions.Methods; -using YNL.Utilities.Addons; - -namespace YNL.SimpleAISystem -{ - public class AIActionSample : AIAction - { - public AIActionSample() : base(null) { } - public AIActionSample(AIController controller) : base(controller) { } - - // Make the properties you want to hide as private; the Editor is currently not support - // Reference properties so you can only get it from Initialize() method - private Rigidbody _rigidbody; - - // Make the properties you want to edit inside Editor as public - public int Distance; - public KeyCode KeyCode; - - public override void Initialize(AIController controller) - { - base.Initialize(controller); - - _rigidbody = controller.Root.GetComponent(); - } - - public override void Convert(SerializableDictionary properties) - { - // Use converting method to convert string into the types you want. - Distance = int.Parse(properties["Distance"]); - - // For enum you can use MEnum.Parse(string) as below - KeyCode = MEnum.Parse(properties["KeyCode"]); - } - - public override void DoAction() - { - // Perform the actions - } - - public override void OnEnterState() - { - // Do something when entering the state - } - - public override void OnExitState() - { - // Do something when exiting the state - } - } -} -``` - -
    - -
    - AIDecisionSample.cs (Sample for custom AIAction script) - -```csharp -using UnityEngine; -using YNL.Extensions.Methods; -using YNL.Utilities.Addons; - -namespace YNL.SimpleAISystem -{ - public class AIDecisionSample : AIDecision - { - public AIDecisionSample() : base(null) { } - public AIDecisionSample(AIController controller) : base(controller) { } - - // Make the properties you want to hide as private; the Editor is currently not support - // Reference properties so you can only get it from Initialize() method - private Rigidbody _rigidbody; - - // Make the properties you want to edit inside Editor as public - public int Distance; - public KeyCode KeyCode; - - public override void Initialize(AIController controller) - { - base.Initialize(controller); - - _rigidbody = controller.Root.GetComponent(); - } - - public override void Convert(SerializableDictionary properties) - { - // Use converting method to convert string into the types you want. - Distance = int.Parse(properties["Distance"]); - - // For enum you can use MEnum.Parse(string) as below - KeyCode = MEnum.Parse(properties["KeyCode"]); - } - - public override bool DoDecision() - { - // Decise the transition - return true; - } - - public override void OnEnterState() - { - // Do something when entering the state - } - - public override void OnExitState() - { - // Do something when exiting the state - } - } -} -``` - -
    -
    From db8df33e3569c37ef42042cef73e9af603381bcc Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:24:48 +0700 Subject: [PATCH 29/34] Update Test.md --- Test.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Test.md b/Test.md index a8fad84..54fa56d 100644 --- a/Test.md +++ b/Test.md @@ -3,6 +3,9 @@
    • You can open the Sample Scene to have a better imagination of what you need. Go inside Packages/YのL - Simple AI System/Sample/Sample Scene; for now you can not open the scene because you have no right to open a read-only scene from a package. But don't worry, all you need to do is just copying the scene and paste it somewhere you want; then now you can open it
    • +
    • Take a look to AI Root object, it contains an AI Root (Script) component, then that will be the component you need to add to an AI object. If it have animations, add Animator too.
    • +
    • Look at it child AI Controller, this is the Controller of the AI system. Add the component and drop the AI Behaviour you want to use inside.
    • +
    • Everything is done, if you have not done an Action to get a target; make sure to put an object inside the Target field or it will throw an error.
    From 7db2763d9a15a6a6255c726664dc30c749519c71 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:25:28 +0700 Subject: [PATCH 30/34] Update Test.md --- Test.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Test.md b/Test.md index 54fa56d..4fca6cb 100644 --- a/Test.md +++ b/Test.md @@ -4,7 +4,7 @@
    • You can open the Sample Scene to have a better imagination of what you need. Go inside Packages/YのL - Simple AI System/Sample/Sample Scene; for now you can not open the scene because you have no right to open a read-only scene from a package. But don't worry, all you need to do is just copying the scene and paste it somewhere you want; then now you can open it
    • Take a look to AI Root object, it contains an AI Root (Script) component, then that will be the component you need to add to an AI object. If it have animations, add Animator too.
    • -
    • Look at it child AI Controller, this is the Controller of the AI system. Add the component and drop the AI Behaviour you want to use inside.
    • +
    • Look at it child AI Controller, this is the Controller of the AI system. Add the component and drop the AI Behaviour you want to use inside. (AIController should be inside a child object of AIRoot)
    • Everything is done, if you have not done an Action to get a target; make sure to put an object inside the Target field or it will throw an error.
    From b0ae9a3dfe8d907ea62ab2831801100f59d2192c Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:25:42 +0700 Subject: [PATCH 31/34] Update Test.md --- Test.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Test.md b/Test.md index 4fca6cb..bc74624 100644 --- a/Test.md +++ b/Test.md @@ -1,4 +1,4 @@ - +

    ★ How to set up your AI objects

      @@ -8,5 +8,5 @@
    • Everything is done, if you have not done an Action to get a target; make sure to put an object inside the Target field or it will throw an error.
    - +
    From 1327840b275f9e615af4ac605c8729a17b1838d3 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:25:57 +0700 Subject: [PATCH 32/34] Update README-en.md --- Documents/README-en.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documents/README-en.md b/Documents/README-en.md index ef4c3d9..3189212 100644 --- a/Documents/README-en.md +++ b/Documents/README-en.md @@ -192,3 +192,15 @@ namespace YNL.SimpleAISystem
    +
    +

    ★ How to set up your AI objects

    + +
      +
    • You can open the Sample Scene to have a better imagination of what you need. Go inside Packages/YのL - Simple AI System/Sample/Sample Scene; for now you can not open the scene because you have no right to open a read-only scene from a package. But don't worry, all you need to do is just copying the scene and paste it somewhere you want; then now you can open it
    • +
    • Take a look to AI Root object, it contains an AI Root (Script) component, then that will be the component you need to add to an AI object. If it have animations, add Animator too.
    • +
    • Look at it child AI Controller, this is the Controller of the AI system. Add the component and drop the AI Behaviour you want to use inside. (AIController should be inside a child object of AIRoot)
    • +
    • Everything is done, if you have not done an Action to get a target; make sure to put an object inside the Target field or it will throw an error.
    • +
    + +
    + From 769abde56bebaaab0f777dcbe9e18dbe45fef23e Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:29:56 +0700 Subject: [PATCH 33/34] Update README-vi.md --- Documents/README-vi.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documents/README-vi.md b/Documents/README-vi.md index 74d34a5..65d4afc 100644 --- a/Documents/README-vi.md +++ b/Documents/README-vi.md @@ -190,6 +190,20 @@ namespace YNL.SimpleAISystem
    +
    +

    ★ Cách thiết lập đối tượng AI của bạn

    + +
      +
    • Bạn có thể mở Scene mẫu để hình dung rõ hơn về những gì bạn cần. Vào bên trong Packages/YのL - Simple AI System/Sample/Sample Scene; hiện tại bạn không thể mở scene vì bạn không có quyền mở read-only scene từ một package. Nhưng đừng lo lắng, tất cả những gì bạn cần làm chỉ là sao chép scene và dán nó vào nơi bạn muốn; sau đó bây giờ bạn có thể mở nó
    • +
    • Hãy nhìn vào đối tượng AI Root, nó chứa thành phần AI Root (Script), khi đó nó sẽ là thành phần bạn cần thêm vào đối tượng AI. Nếu nó có animations, hãy thêm cả Animator nữa.
    • +
    • Nhìn vào đối tượng con AI Controller, đây là Controller của hệ thống AI. Thêm thành phần này và thả AI Behaviour mà bạn muốn sử dụng vào bên trong. (AIController phải nằm trong đối tượng con của AIRoot)
    • +
    • Mọi thứ đã xong, nếu bạn chưa thực hiện Action để lấy được Target; hãy đảm bảo đặt một đối tượng vào trong trường Target nếu không nó sẽ báo lỗi.
    • +
    + +
    + + + From f78fa823cfd5ff7e5ac4861fc3bd357d453103e3 Mon Sep 17 00:00:00 2001 From: Yunasawa Date: Sat, 18 May 2024 23:30:17 +0700 Subject: [PATCH 34/34] Update README-vi.md --- Documents/README-vi.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Documents/README-vi.md b/Documents/README-vi.md index 65d4afc..5d3b5b7 100644 --- a/Documents/README-vi.md +++ b/Documents/README-vi.md @@ -190,6 +190,8 @@ namespace YNL.SimpleAISystem + +

    ★ Cách thiết lập đối tượng AI của bạn

    @@ -203,7 +205,3 @@ namespace YNL.SimpleAISystem
    - - - -