Simply playing sport in schools may not be the best way to instil virtues like character and resilience in pupils, a leading education expert has said.

Children gain these vital social skills by learning in environments that value responsibility, discipline and encourage them to work together, according to Andreas Schleicher.

Speaking ahead of the Global Education and Skills Forum in Dubai this weekend, Mr Schleicher, director for education and skills at the Organisation for Economic Co-operation and Development (OECD), said there are many ways to teach character as part of everyday schooling.

His comments come amid growing calls for UK schoolchildren to be taught the softer skills they will need later in life - such as leadership and teamwork.

Education Secretary Nicky Morgan has previously suggested that learning traits like perseverance and confidence are "equally important" to teenagers as gaining good exam results.

Ministers have announced a grant scheme to fund activities to help instil these characteristics, including an initiative launched last summer bringing rugby coaches from Premiership clubs into schools to work with disaffected children.

At the time, Mrs Morgan said that all youngsters should learn the values of the sport, such as how to "bounce back from setbacks", show integrity in victory and defeat and respect others.

But Mr Schleicher said: "I don't see any reason why rugby would be a better way of teaching character than mathematics. I think teaching character has a lot to do with how we behave, what behaviour we value."

Japanese classrooms have a high level of discipline he said, adding "at the end of the school day, the teacher cleans the classroom with the students, or you take your shoes off when you enter the school.

"There are a lot of things that actually strengthen character more. I don't think it's an issue of an additional school subject. It's a lot more about how we teach."

Mr Schleicher said that UK private schools are a good example of building character.

"If you look at your really great independent schools, they are not about a little bit more maths, or a little bit more science, or a little bit more sports.

"Their differentiator is character skills, that's why those students are successful in life, because they have learnt to manage themselves, they have learnt to manage relationships with others, they can think for themselves, work with others, they have leadership skills, resilience. That is the differentiator of those schools and they are not necessarily acquiring this with sports alone.

"They are acquiring this because they are growing up in an environment that shapes and strengthens character."

For the first time this year, the OECD's international Programme for International Student Assessment (Pisa) tests - which look at how teenagers around the world are doing in areas like reading and maths, will be looking at social skills, Mr Schleicher said, adding that he did not know which country would come out on top.

Character education is high on the agenda for many countries now, he suggested, but little has been done so far to measure its impact.

"We know that in the world in which we live, it's no longer about teaching you something, but giving people the kind of compass and navigation skills to find their own way in an increasingly complex world," Mr Schleicher said.

"We can no longer teach students for life. Those students have to figure out life on their own and things like leadership, curiosity, resilience, mindfulness, social skills, they are becoming more important. Can we measure them well? I don't think we can, we are just at the very beginning."

A Department for Education spokesman said: "Character education and academic attainment are two sides of the same coin - and sport plays a vital role in this.

"That's why we are investing £5 million in character education to help pupils develop confidence, motivation and resilience, as well as the core skills they need to succeed in education and employment.

"We have given teachers the freedom to develop lessons that will excite and inspire their pupils, so that they receive an excellent education allowing them to realise their full potential.

"Sport helps develop positive behaviours like fair play and leadership and teaches young people how to bounce back from defeat, how to respect others and how to work together to achieve amazing feats."