• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Zarine

Field Marshal
134 Badges
Feb 28, 2007
4.830
684
  • Europa Universalis IV: Res Publica
  • Gettysburg
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • For the Motherland
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler: Cold War
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sword of Islam
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • A Game of Dwarves
  • Commander: Conquest of the Americas
  • Darkest Hour
  • East India Company Collection
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
I want to start a mod with the available API, however, I'm facing a big issue with the initial "using" declarations.
The Debug Journal inform me with the following error :
"Error CS0246: The type or namespace name 'UnityEngine' could not be found. Are you missing a using directive or an assembly reference?"

Here is the current source :
Code:
using ICities;
using UnityEngine;
 
namespace MyMod
{
  public class MyMod: IUserMod
  {
    public string Name { get { return "My Mod"; } }
    public string Description { get { return "This is my mod"; } }
  }
 

}

I'm taking the using directly from the wiki modding API page, so what am I doing wrong?
 

Zarine

Field Marshal
134 Badges
Feb 28, 2007
4.830
684
  • Europa Universalis IV: Res Publica
  • Gettysburg
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • For the Motherland
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler: Cold War
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sword of Islam
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • A Game of Dwarves
  • Commander: Conquest of the Americas
  • Darkest Hour
  • East India Company Collection
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
Somehow I was able to pass it now without any real change...

And I'm unable to add "using ColossalFramework.UI;" with the same error while I see other using it without any problems.
 

Forser

Sergeant
44 Badges
Aug 14, 2010
51
1
  • Cities in Motion
  • Cities: Skylines Deluxe Edition
  • Semper Fi
  • Victoria: Revolutions
  • Pirates of Black Cove
  • Naval War: Arctic Circle
  • Magicka
  • Hearts of Iron III
  • Europa Universalis III Complete
  • Cities in Motion 2
  • Divine Wind
  • Cities: Skylines - Green Cities
  • Mount & Blade: Warband
  • Age of Wonders: Planetfall Sign Up
  • Mount & Blade: With Fire and Sword
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Hearts of Iron IV Sign-up
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Age of Wonders III
  • A Game of Dwarves
  • Cities: Skylines - Campus
  • Prison Architect
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Cities: Skylines Industries
  • Magicka: Wizard Wars Founder Wizard
  • Cities: Skylines
  • 500k Club
  • War of the Roses
  • Warlock: Master of the Arcane
  • Victoria 2
  • The Showdown Effect
  • Teleglitch: Die More Edition
  • Ship Simulator Extremes
  • Europa Universalis III Complete
  • Leviathan: Warships
  • Europa Universalis III Complete
  • Heir to the Throne
  • Europa Universalis III
  • Dungeonland
  • Crusader Kings II
Are you using Visual Studio for developing the mod?

If so, have you added references to UnityEngine.dll, ICities.dll, Assembly-CSharp.dll, ColossalManged.dll in your Solution Explorer? (Right click References then Add References, Select Browse and go to the \Steam\steamapps\common\Cities_Skylines\Cities_Data\Managed folder and select those files and click Add) .. Now you shouldn't get anymore errors.
 

Zarine

Field Marshal
134 Badges
Feb 28, 2007
4.830
684
  • Europa Universalis IV: Res Publica
  • Gettysburg
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • For the Motherland
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler: Cold War
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sword of Islam
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • A Game of Dwarves
  • Commander: Conquest of the Americas
  • Darkest Hour
  • East India Company Collection
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
I have it installed already for work related stuff and indeed that solved my issue and I have my little test working.

However it's a bit sad that the ingame built in one is not working because it seems way nicer for debugging (changing something in the source makes it recompile and launch it immediatly with the change).
Maybe I should open a bug report so that they improve it.
 

Zarine

Field Marshal
134 Badges
Feb 28, 2007
4.830
684
  • Europa Universalis IV: Res Publica
  • Gettysburg
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • For the Motherland
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler: Cold War
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sword of Islam
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • A Game of Dwarves
  • Commander: Conquest of the Americas
  • Darkest Hour
  • East India Company Collection
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
Thank you very much.

Do you know if there is something more efficient than compiling, launching game, testing, closing game, compiling, launching...
Like possibility to skip the launching/closing part?
 

Forser

Sergeant
44 Badges
Aug 14, 2010
51
1
  • Cities in Motion
  • Cities: Skylines Deluxe Edition
  • Semper Fi
  • Victoria: Revolutions
  • Pirates of Black Cove
  • Naval War: Arctic Circle
  • Magicka
  • Hearts of Iron III
  • Europa Universalis III Complete
  • Cities in Motion 2
  • Divine Wind
  • Cities: Skylines - Green Cities
  • Mount & Blade: Warband
  • Age of Wonders: Planetfall Sign Up
  • Mount & Blade: With Fire and Sword
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Hearts of Iron IV Sign-up
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Age of Wonders III
  • A Game of Dwarves
  • Cities: Skylines - Campus
  • Prison Architect
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Cities: Skylines Industries
  • Magicka: Wizard Wars Founder Wizard
  • Cities: Skylines
  • 500k Club
  • War of the Roses
  • Warlock: Master of the Arcane
  • Victoria 2
  • The Showdown Effect
  • Teleglitch: Die More Edition
  • Ship Simulator Extremes
  • Europa Universalis III Complete
  • Leviathan: Warships
  • Europa Universalis III Complete
  • Heir to the Throne
  • Europa Universalis III
  • Dungeonland
  • Crusader Kings II
If you read the post about setting up VS that i linked earlier, it says at the end of that post on how to make it pretty much reload the mod without closing the game.