x


Screen Saver Development in Unity?

Hi

First of all, I'm neither a AAA 3d game title, nor i am in this field. I am researching on different commercial Game engines that could be used for Screensaver development [easily] and I found out DX but i'm interested in Unity personally. So could you please guide in this regard? Because I'm not sure if changing .exe to .scr will be much helpful. I want it to install in a screensaver manner and then become a default screensaver.

Any help will be highly appreciated.

more ▼

asked Jan 02 '10 at 11:06 AM

user-720 (yahoo) gravatar image

user-720 (yahoo)
21 1 1 2

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

some engines might have special features for creating screen saver setups but you just need an executable that respond correctly to command line options. 1 create an app in unity. 2 in one of the Awake functions check for sent command line options. /s means you should show the screen saver. /c means you should show the settings dialog. /p means you should show the screen saver in the small preview window. it tells you the window handle but unity can not draw on any external window. to check for command line switches use Environment.GetCommandLineArgs() that returns an array of strings. the first one is the name and path of the app. you should create a installer that copies your app to %windir%\system32. you should change the file extension to scr as you said. unity indie can not be used easily because it will show the unity's screen before checking for command line arguments. you can create a small console application that checks for command line arguments and then if needed run the unity application. it's the way that most of screen savers do because the settings dialogs are in windows form in most of the time rather than in game GUI. unity GUI is powerful and you can use that for settings dialog.

using quest3d or DX might be easier in this steps but creating the main application in unity is so easy. DX is generally a good product in this situation but you should pay for that. the engine has some advantages against unity like it's weather system and some shaders like ocian shader. also you can build windows sidebars with DX. you can do that with unity too but it needs more work in your side. you need to create XML files and ... yourself. as i saw the web site of DX they don't have a screen saver exporting option but quest3d has one. as i know gamestudio can draw on external windows but i don't know if any other engine can do that or not.

this code gets all command line arguments and shows them in a GUI

using UnityEngine;

using System; public class commandline : MonoBehaviour { private string[] args; void Start() { args = Environment.GetCommandLineArgs();

}

void OnGUI()
{
    GUILayout.BeginArea(new Rect (30,30,600,6000));
    foreach (string argument in args)
    {
        GUILayout.Label(argument);
    }
    GUILayout.EndArea();
}

}

more ▼

answered Jan 02 '10 at 01:58 PM

Ashkan_gc gravatar image

Ashkan_gc
9.1k 33 56 117

I can't get this to work. The screen saver shows up in the control panels drop down list, but when I select it I get an error window saying "Data folder not found – There should be a '_Data' folder next to the executable". The problem is; there IS a data folder next to the screen saver executable, it is just not found. Any idea what the problem could be? Anyone?

Apr 16 at 08:32 AM CarlEmail

Ah! I just need to put the _Data folder in 'C:WindowsSysWOW64'. http://social.msdn.microsoft.com/For...2-7fbdc3147521

Apr 18 at 06:58 AM CarlEmail
(comments are locked)
10|3000 characters needed characters left

One thing you might try: exe2scr which you find on this site. Some people claim that you could simply create a screensaver by changing the extension from .exe to .scr; so that would be the first thing I'd try. You'll probably also need some Installer packager software to achieve the result you're looking for. And you may have to manually go into full-screen in the Unity application (that's very easy to do in code, so I wouldn't worry about that part).

Probably you could use Unity (the free editition) to give it a try with a very simple test-scene.

more ▼

answered Jan 02 '10 at 01:23 PM

jashan gravatar image

jashan
10.1k 25 40 116

(comments are locked)
10|3000 characters needed characters left

Since the iPhone suspends and locks after a period of inactivity, I'm not sure a screen saver is a viable product (if your iphone is inactive, it is in your pocket!).

That said, you could write an app that acts like a screen saver if you REALLY wanted to. In that case, unless you want 3D, you are much better off with cocos2D. It is free, natively 2D, has a very active and fairly experienced (more so than unity's) community.

more ▼

answered Jan 02 '10 at 12:20 PM

jbishop 1 gravatar image

jbishop 1
79 1 1 4

I think the question was not about Unity iPhone ;-)

Jan 02 '10 at 01:18 PM jashan

he wants a windows screen saver because he said something about DX studio. DX is a windows only engine.

Jan 02 '10 at 04:40 PM Ashkan_gc
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x261
x70
x3

asked: Jan 02 '10 at 11:06 AM

Seen: 3790 times

Last Updated: Apr 18 at 06:58 AM