Custom Templates


photo

Recommended Posts

How would I convert a project to a template and get it to show up in the "Template" dropdown when creating a new project? 

Link to post

Tessalator

Right now there is no custom templates available for projects, but after SDK Browser refactoring we will see what we can do about this. It's not a simple task to implement (mostly because of the migration), so I also would not expect this feature to appear soon.

As workaround you can simply copy contents of the newly created project to some directory and later use it when you need to create a new project.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to post

Copying works OK on the Engine side, but doesn't really work on the C# side, especially of you are using VS Solutions and not just loose .cs files.  I have figured a way to get something like custom templates I'm putting in another post.

I tried a clone and rename approach on an entire project. Remaining project in VS has always been difficult, and I knew an added environment would make things worse. It was a good learning experience... but I wouldn't make a habit of it lol.

But I was successful. You need to rename things inside several files. It was usually taking >10min to do all of the edits ( I could likely get it down to 5, but still..) If I make mistakes though, things blowup when I try to "Add Existing" in the SDK Browser or later on.

FYI, here are some of the things I encountered multiple times during my attempts. Other things stopped me, but weren't repeatable.

Name Mismatch:
Starting with a project named "Template" renamed as "FirstPersonController" and (20 mins later lol) added it as an existing project. It came in (and mostly worked) but it still showed up as "Template" in the Browser. (I think I fixed this by editing the .project first.)

Spoiler

Selecting "Other Actions=>Configure  Project" from "Template" gives this.

BrowserTile.PNG.a498a319b3e0d450b878d446aafb4c51.PNG  ConfigureProject.PNG.3573a55091bd1dbda739af5480880ef9.PNG

In other cases, these randomly and repeatedly showed up in my thumbnails

Spoiler

Thumbs.thumb.PNG.7516c63641b713cdf3a1f965a7344438.PNG

Things got really strange when I loaded a project and got something completely different! Apparently when the Browser gets confused it bails out by loading stuff from the editor2 folder.

Spoiler

I started with this Template, renamed everything to "FirstPersonController" (FPC), and got it to "Add Existing" in SDK (and show as FPC). I tried to load it, expecting this with FPC replacing Template):
Expected.thumb.PNG.52ff6ed260e8a41f9728e15328124151.PNG

What loaded is below...  Notice the difference between the world in assets and title bar.

Engine2.thumb.PNG.eba336bfacaac132d83bd064fb810ee6.PNG

Bottom line on Clone and Rename - "Don't try this at Home"...

 

Link to post

As you can see in the title bar of the loaded Editor - default built-in template.world is being loaded. You need to change the default world in .project file to something different:

"default_world": "dont_use_template_name_here",

Hope that makes sense.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to post

Makes sense. I'm finally figuring out the relationships between the variables in the config files. I hit the "loading defaults" case a lot, but not often in normal work. It looks like that's the engines way of saying "Don't do that!". lol 

  • Thanks 1
Link to post