codestage.net

Hey guys!

As you already might notice, there are no any quality posts here for years now.
I’m sorry for this, but I’m not sure something appear here anytime soon.

Meanwhile feel free to follow me on twitter for the UAS product updates and other interesting things I post there:
https://twitter.com/dmitriy_focus

Also feel free to visit new codestage.net website made specifically for the UAS assets I’m working on:
http://codestage.net/

Thanks everyone who visits this blog!

Share Button

Happy New Year 2017! =D

Lol, it’s a February now but I just reached my blog to make this New Year post xD
First of all, I wish you all great new 2017 year, and wish you to reach new, previously unreachable level of success in all spheres this year!
Also, as you already noticed, I didn’t posted here something useful for a long time. And looks like it’s not going to happen anytime soon.
That’s why I’m closing this blog and moving to the new place – codestage.net.

It’s possible I’ll open new blog there, to tell you more about my plugins or something else, but for now it’s just a products & support place.

Thanks for staying with me and have a greatest year ever!

Share Button

Happy New Year 2016!

This year was amazing, it had lots of new and interesting, lots of good and bad, now it’s time to move on, to the future, to the new achievements, to the new 2016 year!

Merry Christmas and Happy New Year, dear friends!!!

2016-new-year

Share Button

Advanced FPS Counter Level 11 FREE postmortem

Hey guys!

I’m totally late to the party, but I promised few people to make a blog post on my Level 11 FREE experience, so here is it.
I’ll try to be short.

My Advanced FPS Counter was selected for the September’15 Level 11 and got to the FREE section.
I’ve asked for Level 11 free in the sales sign up form, so it’s was my initiative to go for the Level 11 FREE, I just wished to try it, to see how it will affect my sales, etc.

And here are my observations now, after 2.5 months since my participation start.

My normal average sales of the AFPSCounter are ~26 copies per month.
Level 11 FREE involvement guarantees some compensation from the Unity side. They say it’s an average of your last 3 months or $250 minimum.
I’ve been paid $340,00 USD, which is really nice, since I often make less than this from this plugin.

So, you’re not going to giveaway your plugin in Level 11 FREE and get no money for this, you’re actually paid by the Unity Technologies directly.

In september, I had 3315 copies downloaded by the Level 11 customers (people with pro license or paid subscription) and 41 copies sold to the people who has no access to the Level 11!

To sum up, I’ve got $340 from Unity and $287 from regular sells, very good results.

Level 11 FREE helped my plugin to show up on main page and to top the own category charts, leading to even more visibility.
It lead to the new reviews, new customers, new ratings.

October brought 36 more downloads somehow and 36 sold copies, still higher than my average.

November so far goes more likely as usual, 12 copies sold at the moment when I write this (which extrapolates to the average of 24 to the end of the month).
My participation in Level 11 FREE with one of my plugins didn’t seem to affect both of my other plugins, at least I can’t see it in sale numbers.

Conclusion
Level 11 FREE allows you to get maximum visibility and lots of new customers. Most of them will download your asset just to keep it in their arsenal though.
Some of them will try your product and leave reviews, bug reports and other feedback, which is also very important.
You’ll not lose anything from the Level 11 FREE participation, but you’ll get much – maximum visibility, extra sells to the non-Level 11 people, extra money from Unity Technologies, new reviews, ratings, new feedback and lots of potential customers.

Level 11 FREE is a best option for the new assets, it’s a quick rocket launch for them.
But don’t expect much from it if you have mature asset with good reputation and lots of existing customers.

Share Button

How to nicely select item in the Unity’s two-column Project Browser

Hey, I’ll try to be short.
I’m working on the Maintainer‘s Issues Finder improvements and one of such improvement was to select (show) the scene file at the Project Browser along with target GameObject in the Hierarchy when user press “Show” next to the found issue.

At the first iteration, I did the selection using Selection.objects and it worked great with One-column view mode of the Project Browser.
But things get weird when I switched to the two-column mode: target scene file still get selected, but it didn’t show up until I manually navigated to the folder with that file.

And surprisingly, I faced two common issues here:
1. Unity has no API to let you know in which mode the Project Browser is.
2. Unity has no API to select specific folder in the first column of the Project Browser.

But thankfully, we have ILSpy and reflection! 😉
So, using ILSpy I managed to find all what I need;
UnityEditor.ProjectBrowser class
– static s_LastInteractedProjectBrowser field to access last used ProjectBrowser window (we can have lot of ProjectBrowsers in Unity layout).
– private field m_ViewMode of the ViewMode enum type which has two values – OneColumn (0) and TwoColumns(1)
– private ShowFolderContents() method which expands first column of the TreeView to the specified folder and selects it

And here is a resulting code which selects both object in scene hierarchy and scene file in Project Browser in any column mode (one or two columns):

public void SelectObjectAndScene(GameObject targetGameObjectInScene, string scenePath)
{
	List<Object> selection = new List<Object>();

	Object sceneFile = AssetDatabase.LoadAssetAtPath(scenePath, typeof(Object));
	selection.Add(sceneFile);

	Type projectBrowserType = Type.GetType("UnityEditor.ProjectBrowser,UnityEditor");
	if (projectBrowserType != null)
	{
		FieldInfo lastProjectBrowser = projectBrowserType.GetField("s_LastInteractedProjectBrowser", BindingFlags.Static | BindingFlags.Public);
		if (lastProjectBrowser != null)
		{
			object lastProjectBrowserInstance = lastProjectBrowser.GetValue(null);
			FieldInfo projectBrowserViewMode = projectBrowserType.GetField("m_ViewMode", BindingFlags.Instance | BindingFlags.NonPublic);
			if (projectBrowserViewMode != null)
			{
				// 0 - one column, 1 - two column
				int viewMode = (int)projectBrowserViewMode.GetValue(lastProjectBrowserInstance);
				if (viewMode == 1)
				{
					
					MethodInfo showFolderContents = projectBrowserType.GetMethod("ShowFolderContents", BindingFlags.NonPublic | BindingFlags.Instance);
					if (showFolderContents != null)
					{
						Object sceneFolder = AssetDatabase.LoadAssetAtPath(Path.GetDirectoryName(scenePath), typeof(Object));
						showFolderContents.Invoke(lastProjectBrowserInstance, new object[] { sceneFolder.GetInstanceID(),  true});
					}
					else
					{
						Debug.LogError("Can't find ShowFolderContents method!");
					}
				}
			}
			else
			{
				Debug.LogError("Can't find m_ViewMode field!");
			}
		}
		else
		{
			Debug.LogError("Can't find s_LastInteractedProjectBrowser field!");
		}
	}
	else
	{
		Debug.LogError("Can't find UnityEditor.ProjectBrowser type!");
	}

	selection.Add(targetGameObjectInScene);
	Selection.objects = selection.ToArray();
}

This code might be not elegant and clean since it’s a quick try to leave snippet in the blog. Feel free to correct my where I’m wrong.

P.S.: if you wish only show some file in the Project Browser without selection, just use EditorGUIUtility.PingObject(AssetDatabase.LoadAssetAtPath(scenePath, typeof(Object))); It will work fine with one-column layout and will work with two-column layout if you don’t select anything else.

Share Button