Giter VIP home page Giter VIP logo

Comments (1)

tomkail avatar tomkail commented on June 27, 2024

Wowee, you should write the documentation! We'll change it to 120, good
call!

On Thursday, 7 July 2016, Clément Busschaert [email protected]
wrote:

I recently added a few script templates to my Unity installation, because
I'm using a lot of custom editors and scriptable objects, and this happened:
[image: ink-order-templates]
https://cloud.githubusercontent.com/assets/13928490/16650316/d8b68b58-443d-11e6-8b7c-d70272f062aa.PNG

As you see, there is no longer a separator before the ink item. This is
because my templates use the order space between 90 and 100: the same thing
would happen if you created an asset menu item with an order of 95 for
example. Though in that case, unless your assets are heavily related to
scripts, I'd suggest you change your own order to above 120, because it's
way easier.

It's not a problem in itself, so you could ignore it. But if it bothers
you, like me, because you heavily rely on the separators to survey a menu,
here's what you must change:

  1. Go to Assets/Plugins/Ink/Editor/Tools.
  2. Open the file InkEditorUtils.
  3. Go to line 46. You're looking for this chunk of code:

[MenuItem("Assets/Create/Ink", false, 100)]
public static void CreateNewInkFile () {
string fileName = "New Ink.ink";
string filePath = AssetDatabase.GenerateUniqueAssetPath(Path.Combine(GetSelectedPathOrFallback(), fileName));
CreateNewInkFile(filePath);
}

  1. Change the 100 value to whatever you need.

small explanation of how menu order indices work
Note that the order of the scene item is 191 and the last shader item has
an order of 90 (pseudo-ignored for the separator because its parent menu
has the order of the first shader, which is 83).
If you want a separator, you need a gap of at least 11 order indices
between two items. So, by default, you have enough space between the
scripts "section" and the scene "section" to fit 9 individual separated
items, of orders 94, 105, 116, 127, 138, 149, 160, 171, and 182. Remember
that if you have nested items, only the smallest order of the whole
architecture counts. (on my screenshot, Adventure contains a bunch of
items, the smallest being Adventure/Interactions/Generic at 110 (which is
why it's not separated from the ink item), and the biggest
Adventure/Inventory/Item at 125, though to have a separator to the next
item, that item would only need to be of order 121 at least, because
Adventure is registered at 110.)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#18, or mute the
thread
https://github.com/notifications/unsubscribe/ABMd0A04EbXrEvX9sNso-a0r9MFkbTpZks5qTN8pgaJpZM4JG-dZ
.

from ink-unity-integration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.