How To Add A Dash Or Dotted Stroke To Shapes & Paths In Photoshop

Photoshop is a very powerful image editing app but it has always lacked in one particular area; drawing stylized lines. If you use Photoshop CS, you know there aren’t any tools for drawing a dash or dotted line. You have to improvise a solution by playing around with the brush tool. Photoshop CC 2017 addresses this gap to some extent. The newer version lets you create custom stroke styles for paths and shapes and also comes with a preset dash and dot pattern. Here’s how the new feature works in Photoshop CC and how you can replicate it on Photoshop CS.
Continue reading How To Add A Dash Or Dotted Stroke To Shapes & Paths In Photoshop

Recent search terms:

  • photoshop stroke path leaving gaps

Unity How To Get Current Scene Name

Unity3D How To Get Current Scene Name

I created a simple countdown timer that jumped to the next scene. I wanted to reuse the same script for this effect, two times. Instead of rewriting the same script, I needed to detect the current scene name so the script knows where to jump next. Here is how:

Include The Namespace

Include the SceneManagement namespace in your project:
using UnityEngine.SceneManagement;

Get The Current Scene Name

Using the Start function you can grab the current scene name when the scene starts:
string currentScene;
void Start() {
currentScene = SceneManager.GetActiveScene().name;
}

Load The Target Scene

Now that you have the current scene name, you can figure out what to do in yo>ur loop:
if( currentScene == "Intro" ) {
SceneManager.LoadScene("MainMenu");
} else {
SceneManager.LoadScene("Intro");
}

I was confused for a sec that the .name was a member of GetActiveScene() but it was cleared up when I found an example on the Unity3D forum.

Unity3D How To Add UI Text Outline

Unity3D How To Add UI Text Outline

I had a scene with a colorful background and some UI text over it. The problem was that the text was hard to read because of the lack of contrast between the text color and the background. So I added a UI text outline component to the Text object.

Add Outline Component

Expand your canvas, select the Text object and go to the Inspector. Click the Add Component button and type in Outline, then click the result to add the Outline component.

Unity3D How To Add UI Text Outline

Customize Outline Component

The Outline component has only three features that you can edit. In my case, I had white text, black outline over light blue background. I left the default settings except I found that unchecking the “Use Graphic Alpha” helped a little.

I also added some text shadow which helped as well. Check out my article on how to do this in Unity3D How To Add UI Text Shadow.

Recent search terms:

  • unity 3d code for adding outline to text UI