Skip to content

Commit

Permalink
1.2.0 - Polish demos before video
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelAsherRivello committed May 11, 2024
1 parent 22bcc0e commit 243d1df
Show file tree
Hide file tree
Showing 71 changed files with 2,773 additions and 4,409 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using UnityEngine;

namespace RMC.Components
{
public class HierarchyDivider : MonoBehaviour
{
protected virtual string Title
{
get { return "Title"; }
}

protected virtual void OnValidate()
{
if (Application.isPlaying)
{
return;
}

var newTitle = CenterTitle(Title, 30);
if (gameObject.name != newTitle)
{
gameObject.name = newTitle;
}
}

private static string CenterTitle(string title, int length)
{
title = " " + title + " ";
int totalPadding = length - title.Length;
int leftPadding = totalPadding / 2;
int rightPadding = totalPadding - leftPadding;

string result = new string('-', leftPadding) + title + new string('-', rightPadding);

return result;
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion RMC DOTS/Samples~/2. RMC DOTS Library Demos.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 243d1df

Please sign in to comment.