Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Game Studio cannot create new game project with qualified name #17

Closed
gitfool opened this issue Sep 14, 2014 · 1 comment
Closed

Game Studio cannot create new game project with qualified name #17

gitfool opened this issue Sep 14, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@gitfool
Copy link

gitfool commented Sep 14, 2014

Creating a new game project in Game Studio works fine if I use a leaf name like 'Test', but I never use unqualified leaf names, so when I first tried to create a new game project I used 'Jellyfish.Test'.

The default namespace suggested is 'Jellyfish.Test', exactly what I'd want to use and expected, but clicking on OK results in an error dialog saying 'Please type a valid namespace'. The only valid namespace seems to be one without a dot, so I settle on 'JellyfishTest' to get past this error, only to get another error dialog saying 'An exception occurred while generating the template. This is not supposed to happen, your session might be in a corrupted state'.

The 'Creating session...' dialog shows the following stack trace:

[]: Info: Loading Assets from Package [Paradox.pdxpkg]
[]: Info: Generate Jellyfish.Test.Game
[]: Error: An exception occurred while generating the template: Unable to parse file [D:/Users/Sean/Documents/Paradox Projects/Jellyfish.Test/Jellyfish.Test/Jellyfish.Test.Game\Effects\Jellyfish.TestEffectMain.pdxfx]
D:\Users\Sean\Documents\Paradox Projects\Jellyfish.Test\Jellyfish.Test\Jellyfish.Test.Game\Effects\Jellyfish.TestEffectMain.pdxfx(5,22): error  : Syntax error, expected: {
D:\Users\Sean\Documents\Paradox Projects\Jellyfish.Test\Jellyfish.Test\Jellyfish.Test.Game\Effects\Jellyfish.TestEffectMain.pdxfx(5,24): error  : Syntax error, expected: {

   at SiliconStudio.Shaders.Parser.ShaderParser.Check(ParsingResult result, String sourceFileName)
   at SiliconStudio.Paradox.Shaders.Parser.Mixins.ShaderMixinCodeGen.GenerateCsharp(String pdxfxShaderCode, String filePath)
   at SiliconStudio.Paradox.Assets.Presentation.Templates.GameTemplateGenerator.ConvertPdxfxToCSharp(String pdxfxfile)
   at SiliconStudio.Paradox.Assets.Presentation.Templates.GameTemplateGenerator.GenerateTemplate(GameTemplateParameters parameters, UFile templateRelativePath, String projectName, Nullable`1 platformType, String currentProfile, Nullable`1 graphicsPlatform, ProjectType projectType, ILogger logger)
   at SiliconStudio.Paradox.Assets.Presentation.Templates.GameTemplateGenerator.Generate(GameTemplateParameters parameters)
   at SiliconStudio.Paradox.Assets.Presentation.Templates.GameTemplateGenerator.<>c__DisplayClass3.<PrepareForRun>b__2()
   at SiliconStudio.Assets.Editor.ViewModel.SessionViewModel.<>c__DisplayClass76.<InvokeTemplateGenerator>b__74()

The Jellyfish.TestEffectMain.pdxfx file contains the following:

using SiliconStudio.Paradox.Effects.Data;

namespace Jellyfish.Test.Effects
{
    shader Jellyfish.TestEffectMain
    {
        using params RenderingParameters;
        using params MaterialParameters;
        using params EffectSystem;

        mixin ShaderBase;
        mixin TransformationWAndVP;
        mixin BRDFDiffuseBase;
        mixin BRDFSpecularBase;
        mixin AlbedoFlatShading;

        if (MaterialParameters.AlbedoDiffuse != null)
            mixin compose albedoDiffuse = MaterialParameters.AlbedoDiffuse;

        if (MaterialParameters.HasSkinningPosition)
        {
            mixin macro MaterialParameters.SkinningMaxBones;
            mixin TransformationSkinning;
        }
    };
}

So the shader name must not contain a dot. Shouldn't it just be generated as 'Main' or 'MainEffect', given its namespace provides enough context, and to avoid redundant repeating of names?

@xoofx xoofx added the bug label Sep 15, 2014
@xoofx xoofx modified the milestone: alpha09 Sep 15, 2014
@xoofx xoofx self-assigned this Sep 15, 2014
@xen2 xen2 assigned xen2 and unassigned xoofx Sep 16, 2014
@xen2
Copy link
Contributor

xen2 commented Sep 16, 2014

Fixed in our development branch, it will be part of alpha09.

stride-bot pushed a commit that referenced this issue Dec 12, 2016
… to master-1.9

* commit '5fe249c34a79b99be0af784791e0297710bd6f2c':
  [Editor] Fix tooltip message about using Alt when dropping a prefab
  [Editor] Make sure position is properly set as well as override when dropping new assets/entities
  [Editor] Fix insertion index when dropping multiple object at once in the scene editor
  [Prefabs] Allow to choose with the Alt key whether to create a container entity when instantiating a prefab
  [Editor] Add a AddChildModifiers flags parameter to drag/drop view models to allow to retrieve the state of modifier keys when evaluating/processing drop
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants